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