Esempio n. 1
0
    void OnCommand(object data)
    {
        if (menuAnim.IsPlaying())
        {
            return;
        }

        int idx = (int)data;

        switch (idx)
        {
        case 0:
            warCtrl.SetFrontArmyRun(WarSceneController.WhichSide.Right);
            break;

        case 1:
            warCtrl.SetFrontArmyBack(WarSceneController.WhichSide.Right);
            break;

        case 2:
            warCtrl.SetArmyDisperse();
            break;

        case 3:
            warCtrl.SetArmyFallIn();
            break;

        case 4:
            warCtrl.SetArmyIdle();
            break;

        case 5:
            isAssaultFlag = true;
            warCtrl.SetArmyAssault(WarSceneController.WhichSide.Right);
            break;

        case 6:
            magic.SetActive(true);
            menuAnim.SetAnim(MenuDisplayAnim.AnimType.OutToRight);
            return;

        //break;
        case 7:
            warCtrl.SetGeneralAssault(WarSceneController.WhichSide.Right);
            break;

        case 8:
            warCtrl.SetArmyEscape(WarSceneController.WhichSide.Right);

            for (int i = 0; i < commands.Length; i++)
            {
                commands[i].SetButtonEnable(false);
            }
            break;
        }

        OnReturn();
    }