EnemyMovement and BoundingsTimeout2D are disabled until it becomes visible in the main camera.
Used RequireComponent to make sure we have these scripts attached. I figured this was a tad better than checking "if script" everywhere we might need to. Note that this only works for components, this will not work for Weapon, as it is a prefab / instance and should be checked before use. Also note that this only adds components it needs when the script itself is added (if it needs to), it won't make changes after it has already been added.
EnemyMovement and BoundingsTimeout2D are disabled until it becomes visible in the main camera.
Used RequireComponent to make sure we have these scripts attached. I figured this was a tad better than checking "if script" everywhere we might need to. Note that this only works for components, this will not work for Weapon, as it is a prefab / instance and should be checked before use. Also note that this only adds components it needs when the script itself is added (if it needs to), it won't make changes after it has already been added.
85