Architecture advice on how to cycle a prefab's characteristics at runtime?
Hey gang,
I'm building a top down shooter for a game jam where the enemy will progress linearly through phases based on the time they're alive. Eg. At 2 seconds it'll change phase, then at 5 seconds, then 10 seconds etc until it reaches its final stage where it remains until it's shot.
Each phase will have the following unique characteristics:
Sprite (and animations)
Collider
Move Speed
Transition time
ScoreMultiplier
Phase name (not necessary)
Initially I thought about setting them all up as separate prefabs and destroying and instantiating the next stage but have read that can be bad for performance, especially when there may be upward of twenty enemies alive at a time. I've considered different ways but with my limited knowledge I've confused myself.
I'm a beginner to intermediate level programmer that is looking to learn more about being a better programmer, so I hope you can talk down to my level. Anything will help me, from a pattern, to data types for the characteristics. I'm happy to watch videos or read tutorials if the answer is in them, I just don't know what I'm looking for to start with.
If there's any extra info that might be helpful to answering this, please let me know. Thank you so much in advance.
Your answer
Follow this Question
Related Questions
[Unity2D] Adding Sound to a Prefab 0 Answers
(2D Top Down Shooter, Unity2D) Creating a bullet trail effect? 0 Answers
Spawned Rocket(Clones) still here after scene swap. 1 Answer
How to create a camera like pocky and rocky in unity 2d with csharp script??? 0 Answers
Unity2d particle system 0 Answers