private void ExitState(GameObject movingPiece) { this.enabled = false; tileHighlight.SetActive(false); MoveSelector move = GetComponent <MoveSelector> (); move.EnterState(movingPiece); }
//passes in the piece that has been selected, to become one that can be moved private void ExitState(GameObject movingPiece) { //disable this state of tileselector this.enabled = false; //remove highlight on piece tileHighlight.SetActive(false); //below two lines are calling on the move selector .cs file, getting the component and telling it to enter the 'moving piece' state. MoveSelector move = GetComponent <MoveSelector>(); move.EnterState(movingPiece); }
/// <summary> /// Exiting the Select State when the Player has selected a Unit to move /// </summary> private void ExitState() { this.enabled = false; tileHighlight.SetActive(false); // Remove Highlight locations foreach (var highlight in allyLocationHighlights) { Destroy(highlight); } foreach (var highlight in moveLocationHighlights) { Destroy(highlight); } foreach (var highlight in attackLocationHighlights) { Destroy(highlight); } moveSelector.EnterState(); }
public void ExitState(GameObject go) { enabled = false; moveSelector.EnterState(go); }