Beispiel #1
0
    void Select()
    {
        if (Input.GetButtonDown("Forward"))
        {
            if (!bUnitMenu)
            {
                if (!bIsChooseMove && !bIsChooseAttack)
                {
                    SquareTile current = squareCoord[currentActiveSquare[0], currentActiveSquare[1]];
                    if (current.currentUnit != null)
                    {
                        bIsSummoner = current.currentUnit.bIsSummoner;
                        unitMenu.Activate(bIsSummoner);
                        bUnitMenu = true;
                    }
                }
                else
                {
                    SquareTile current = squareCoord[currentActiveSquare[0], currentActiveSquare[1]];
                    if (listFloodFillResult.Contains(current))
                    {
                        if (bIsChooseAttack)
                        {
                            //TODO attack
                            print("attack this");
                        }
                        else if (bIsChooseMove)
                        {
                            //TODO move
                            print("move here");
                        }
                    }
                }
            }
        }

        if (Input.GetButtonDown("Back"))
        {
            Back();
        }

        if (Input.GetButtonDown("Cancel"))
        {
            if (bUnitMenu || bIsChooseAttack || bIsChooseMove)
            {
                Back();
            }
            else
            {
            }
        }
    }
Beispiel #2
0
 private void DisplayMenu()
 {
     m_Menu.Activate();
 }