I believe the plan is for enemies to be disabled until they are in the screen. We should set local time (float time = Time.time) when the enemy shows up on screen and is activated (through OnEnable). We then need the sin / cos functions to use Time.time - time instead of pure Time.time (this will make the sin / cos waves act predictably when entering the screen (i.e. the start at time = 0 instead of whatever game time is when they hit the screen).
To avoid errors / exceptions we can set time = 0 on Start (this should be a private variable btw).
I believe the plan is for enemies to be disabled until they are in the screen. We should set local time (float time = Time.time) when the enemy shows up on screen and is activated (through OnEnable). We then need the sin / cos functions to use Time.time - time instead of pure Time.time (this will make the sin / cos waves act predictably when entering the screen (i.e. the start at time = 0 instead of whatever game time is when they hit the screen).
To avoid errors / exceptions we can set time = 0 on Start (this should be a private variable btw).