Hi all, I'm working on my Game Development Capstone, which is a turn-based RPG in Unity. Right now I'm prototyping; and the current stage involves generating enemy encounters. What I'm not sure about, and where things get a little complicated, is storing each generated enemy's stats in an array. Enemy encounters generate…
Unless you are just looking for generic information about object oriented design and data structures, I think you need to ask a more specific question. It's a bit difficult to understand what you are asking right now. A shot in the dark though is that you have code running that creates a random number of enemies which are…
I would make an object and use Get/Set. EnemyObject Orc = new EnemyObject(); Orc.name = "Billy"; Orc.Health = 100; Orc.Speed = 10.5f; This creates an object that everywhere has access to. You can store these enemies in a list and access them by name. Create a random enemy generator... so many things... Just an idea.
What I would do is create a base class that held those stats and whatever other variables that they all share in common, and make a List of that base class that will store a reference to each enemy. public class Enemy : MonoBehaviour {[INDENT]public float health;public float speed;public float attack;public float…