예제 #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;
 }
예제 #2
0
 void PlayCard()
 {
     setObject            = (GameObject)Instantiate(unit);
     currentUnit          = setObject.transform;
     placeableUnit        = currentUnit.GetComponent <PlaceableUnit>();
     unitPlaced           = false;
     moveUnits.unitActive = true;
 }
예제 #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;
 }