Currently there exists 2 types of randomly spawned "timed" game tokens: powerups & UFOs. More could be added in the future, so the implementation design & architecture should be clean, clear, solid & robust.
Though these varying tokens seem disparate in nature (friend vs. enemy), they mostly share common game functionality and should be implemented and handled as such. There are various ways to go about this...
Possible Implementations
Define a base class of TimedToken : GameToken that defines/implements their behaviour.
As standard game tokens, but let a SpawnManager handle the details of timing/spawning.
Currently there exists 2 types of randomly spawned "timed" game tokens: powerups & UFOs. More could be added in the future, so the implementation design & architecture should be clean, clear, solid & robust.
Though these varying tokens seem disparate in nature (friend vs. enemy), they mostly share common game functionality and should be implemented and handled as such. There are various ways to go about this...
Possible Implementations
TimedToken : GameToken
that defines/implements their behaviour.SpawnManager
handle the details of timing/spawning.