private void SpawnGroundUnit(GroundSpawn spawn) { Enemy newEnemy = factory.GetEnemy(spawn.enemy); newEnemy.position = spawn.position - new Vector3(0, 0, offset); newEnemy.MoveToGround(); }
private void Start() { groundSpawn = GameObjectManager.instance.allObjects[1].GetComponent <GroundSpawn>(); player = GameObjectManager.instance.allObjects[0]; //Adds the activated object to allObjects list. Doesn't add three pieces that have been placed on default. if (GameManager.instance.setupComplete) { GameObjectManager.instance.allObjects.Add(gameObject); groundSpawn.objectIndex = GameObjectManager.instance.allObjects.IndexOf(this.gameObject); } }
// Start is called before the first frame update void Start() { ground = GameObject.FindObjectOfType <GroundSpawn>(); SpawnObs(); }
// Start is called before the first frame update void Start() { // On start - spawn ground and diamonds gs = GameObject.FindObjectOfType <GroundSpawn>(); SpawnDiamonds(); }