// Start is called before the first frame update void Start() { for (int i = 0; i <= e.GetComponent <EnemyControl>().Enemies.Count - 1; i++) { enemy = e.Enemies[i];//assigns the prefab object to the list of enemies } health = 3; testing = new EnemyCube(enemy, new returnScore()); //assigns observer object to the function it needs healthTesting = new EnemyCube(enemy, new returnScore()); //assigns observer object to the function it needs subject.AddObserver(testing); subject.AddObserver(healthTesting); }
// Use this for initialization void Start () { enemy = GetComponent<EnemyCube> (); }