Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 3
0
        /// <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();
        }
Ejemplo n.º 4
0
 public void ExitState(GameObject go)
 {
     enabled = false;
     moveSelector.EnterState(go);
 }