Ejemplo n.º 1
0
 public virtual void Init(TowerFloor floor, Vector3Int pos)
 {
     this.floor       = floor;
     tower            = floor.tower;
     _position        = pos;
     tower[_position] = this;
     isInTransit      = false;
 }
Ejemplo n.º 2
0
 private void GenerateNonReactiveTower()
 {
     for (int i = 0; i < towerSize.y; i++)
     {
         TowerFloor floor = CreateTowerFloor(i);
         floors[i] = floor;
         floor.GenerateNonReactiveFloor();
     }
 }
Ejemplo n.º 3
0
 private void GenerateRandomTower()
 {
     for (int i = 0; i < towerSize.y; i++)
     {
         TowerFloor floor = CreateTowerFloor(i);
         floors[i] = floor;
         floor.GenerateRandomBlocks();
     }
 }
Ejemplo n.º 4
0
        private TowerFloor CreateTowerFloor(int level)
        {
            GameObject go = new GameObject("TowerFloor_" + level);

            go.transform.SetParent(transform);
            go.transform.localPosition = new Vector3(0f, level * blockSize, 0f);
            TowerFloor floor = go.AddComponent <TowerFloor>();

            floor.Init(this, blocks, level);
            return(floor);
        }
Ejemplo n.º 5
0
 public override void Init(TowerFloor floor, Vector3Int pos)
 {
     base.Init(floor, pos);
     spawnTime = Time.time;
 }