Example #1
0
 public void addTourelle2(HexCell _cell)
 {
     if (player.getCurrency() >= tourellePrefab2.cost)
     {
         player.spendCurrency(tourellePrefab.cost);
         Tourelle t2 = Instantiate(tourellePrefab2);
         float    x  = _cell.transform.localPosition.x * 0.08f;
         float    y  = 0;
         float    z  = _cell.transform.localPosition.z * 0.08f;
         t2.setPosition(x, y, z);
         _cell.setTurret(t2, 2);
         tourellesList.Add(t2);
     }
 }
Example #2
0
 public void addTourelle2(int _index)
 {
     if (player.getCurrency() >= tourellePrefab2.cost)
     {
         player.spendCurrency(tourellePrefab2.cost);
         Tourelle t2   = Instantiate(tourellePrefab2);
         HexCell  cell = hexGrid.getCell(_index);
         float    x    = cell.transform.localPosition.x * 0.08f;
         float    y    = 0;
         float    z    = cell.transform.localPosition.z * 0.08f;
         t2.setPosition(x, y, z);
         cell.setTurret(t2, 2);
         tourellesList.Add(t2);
     }
 }