Ejemplo n.º 1
0
 //Place unit
 public void SetUnit(GameObject g)
 {
     setObject     = (GameObject)Instantiate(g);
     currentUnit   = setObject.transform;
     placeableUnit = currentUnit.GetComponent <PlaceableUnit>();
     g.GetComponent <SwitchToUnits>().canSwitch = true;
     unitPlaced = false;
 }
Ejemplo n.º 2
0
 void PlayCard()
 {
     setObject            = (GameObject)Instantiate(unit);
     currentUnit          = setObject.transform;
     placeableUnit        = currentUnit.GetComponent <PlaceableUnit>();
     unitPlaced           = false;
     moveUnits.unitActive = true;
 }
Ejemplo n.º 3
0
 //Switch unit place
 public void SwitchUnit(GameObject s)
 {
     temp      = setObject;
     setObject = (GameObject)Instantiate(s);
     Destroy(temp);
     currentUnit   = setObject.transform;
     placeableUnit = currentUnit.GetComponent <PlaceableUnit>();
     s.GetComponent <SwitchToUnits>().canSwitch = true;
 }