コード例 #1
0
    // Select starting cell
    void OnMouseDown()
    {
        // If the game is not paused
        if (!levelControl.checkPause())
        {
            // If the level is over, do nothing
            if (levelControl.levelEnd)
            {
                return;
            }

            // Player may only control a cell of Faction "Player"
            if (faction == Faction.Player)
            {
                //Debug.Log ("OnMouseDown "+ gameObject.name);


                // highlight cell, tell inputControl that we are in a turn, that this is the origin cell
                highlightBlue.enabled = true;
                inputControl.setMove(true);
                inputControl.originCell        = transform;
                inputControl.originCellControl = this;
            }
        }
    }