Пример #1
0
        private void SpawnGroundUnit(GroundSpawn spawn)
        {
            Enemy newEnemy = factory.GetEnemy(spawn.enemy);

            newEnemy.position = spawn.position - new Vector3(0, 0, offset);
            newEnemy.MoveToGround();
        }
Пример #2
0
    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);
        }
    }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     ground = GameObject.FindObjectOfType <GroundSpawn>();
     SpawnObs();
 }
Пример #4
0
 // Start is called before the first frame update
 void Start()
 {
     // On start - spawn ground and diamonds
     gs = GameObject.FindObjectOfType <GroundSpawn>();
     SpawnDiamonds();
 }