Ejemplo n.º 1
0
        public void CreateTower(string TowerType)
        {
            Vector3 Position = PgtNavigator.TowerSpawnPosition;

            // Rock towers at floor
            if (TowerType == Constants.TAG_TOWER_ROCKS)
            {
                Position.y = Constants.FLOOR_Y_POSITION;
            }
            // Arrow tower is on top of the tower.
            if (TowerType == Constants.TAG_TOWER_ARROWS)
            {
                Position.y = Position.y + gameObject.renderer.bounds.size.y / 2;
            }
            // Generate the instance
            Statics.GenerateInstance(Constants.COLLECTION_ALLIES, TowerType, Position);

            // Hide the control of the tower
            this.CreateControls[TowerType].SetActive(false);

            // Show the control to remove the tower
            this.RemoveControls[TowerType].SetActive(true);
        }
Ejemplo n.º 2
0
 public static void SpawnBarricade()
 {
     // Spawn BARRICADE (Home)
     Statics.GenerateInstance(Constants.COLLECTION_ALLIES, Constants.TAG_BARRICADE, PgtNavigator.BarricadeSpawnPosition);
     //Statics.allies.GenerateInstance(AlliesCollection.BARRICADE, BarricadeSpawnPosition);
 }
Ejemplo n.º 3
0
 public static void SpawnTrap()
 {
     // Spwan TRAP
     Statics.GenerateInstance(Constants.COLLECTION_NONE, Constants.TAG_TRAP, PgtNavigator.TrapSpawnPosition);
 }
Ejemplo n.º 4
0
 public static void SpawnMainCharacter()
 {
     // Spawn JACK
     Statics.GenerateInstance(Constants.COLLECTION_ALLIES, Constants.TAG_JACK, PgtNavigator.JackSpawnPosition);            //JackSpawnPosition
     //Statics.allies.GenerateInstance(AlliesCollection.MAIN_CHARACTER, JackSpawnPosition);
 }
Ejemplo n.º 5
0
 public static void SpawnTower()
 {
     // Spawn Tower
     Statics.GenerateInstance(Constants.COLLECTION_NONE, Constants.TAG_TOWER_STRUCTURE, PgtNavigator.TowerSpawnPosition);
     //Statics.allies.GenerateInstance(AlliesCollection.BARRICADE, BarricadeSpawnPosition);
 }
Ejemplo n.º 6
0
 public static void SpawnDog()
 {
     // Spawn DOG (pet)
     Statics.GenerateInstance(Constants.COLLECTION_ALLIES, Constants.TAG_DOG, PgtNavigator.DogSpawnPosition);
     //Statics.allies.GenerateInstance(AlliesCollection.BARRICADE, BarricadeSpawnPosition);
 }