Exemple #1
0
 private void UndoSelectWeapon()
 {
     battleManager.ChangeState(BattleManager.EBattleState.Menu);
     battleManager.ClearRangeAction();
     BattleSelectWeaponMenu.Show();
     BattleActionMenu.Hide();
 }
Exemple #2
0
    private void BattleAction_SelectWeapon(WeaponItem item)
    {
        battleManager.ChangeState(BattleManager.EBattleState.SelectTarget);
        if (item == null)
        {
            Debug.LogError("选择的武器是null");
        }
        else
        {
            Debug.Log(item.ToString());
        }
        BattleActionMenu.Hide();
        BattleSelectWeaponMenu.Hide();
        CharacterLogic logic = battleManager.CurrentCharacterLogic;

        logic.Info.Items.EquipWeapon(item);
        //从选择的武器确定
        var rangeType = item.GetDefinition().RangeType;
        EnumSelectEffectRangeType selRangeType = rangeType.SelectType;
        Vector2Int selRange = rangeType.SelectRange;
        EnumSelectEffectRangeType effRangeType = rangeType.EffectType;
        Vector2Int effRange = rangeType.EffectRange;

        logic.BattleInfo.SetSelectTargetParam(CharacterBattleInfo.EBattleActionType.Attack, logic.GetTileCoord(), selRangeType, selRange, effRangeType, effRange);
        battleManager.ShowSelectTargetRangeAction(logic);
        MenuUndoAction.Push(UndoSelectWeapon);
    }
Exemple #3
0
 public void HideBattlaActionMenu(bool showMainMenu)
 {
     Debug.Log("Hide " + showMainMenu);
     if (showMainMenu)
     {
         ShowBattleMainMenu();
     }
     BattleActionMenu.Hide();
 }
Exemple #4
0
    public void BattleAction_Attack()
    {
        BattleActionMenu.Hide();
        //battleManager.ClearRangeAction();
        CharacterLogic logic = battleManager.CurrentCharacterLogic;

        BuildBattleSelectWeaponMenu(logic);
        BattleSelectWeaponMenu.Show();
        MenuUndoAction.Push(UndoShowBattleActionMenu);
    }
Exemple #5
0
 public bool CheckBattleTalkEvent(CharacterLogic chLogic)
 {
     IActionMenu.UIActionButtonInfo location = new IActionMenu.UIActionButtonInfo();
     if (GetBattleAction_BattleTalk(chLogic, ref location))
     {
         BattleActionMenu.AddAction(location);
         return(true);
     }
     return(false);
 }
Exemple #6
0
 public void ShowBattleActionMenu(EActionMenuState state, CharacterLogic chLogic)
 {
     HideBattleMainMenu();
     switch (state)
     {
     case EActionMenuState.Main:
         BuildBattleActionMenu_Main(chLogic);
         break;
     }
     eActionMenuState = state;
     BattleActionMenu.Show();
 }
Exemple #7
0
    public void BuildBattleActionMenu_Main(CharacterLogic chLogic)
    {
        BattleActionMenu.Clear();
        var point = chLogic.GetActionPoint();

        BattleActionMenu.SetActionPoint(point);
        CheckLocationEvent(chLogic);
        CheckBattleTalkEvent(chLogic);
        CheckMoveAction(chLogic);
        CheckAttackAction(chLogic);
        CheckWaitAction(chLogic);
    }
Exemple #8
0
    public void CheckWaitAction(CharacterLogic chLogic)
    {
        var end = new IActionMenu.UIActionButtonInfo("待机", BattleAction_End, chLogic.IsActionEnable(EnumActionType.Wait));

        BattleActionMenu.AddAction(end);
    }
Exemple #9
0
    public void CheckAttackAction(CharacterLogic chLogic)
    {
        var attack = new IActionMenu.UIActionButtonInfo("攻击", BattleAction_Attack, chLogic.IsActionEnable(EnumActionType.Attack));

        BattleActionMenu.AddAction(attack);
    }
Exemple #10
0
    public void CheckMoveAction(CharacterLogic chLogic)
    {
        var move = new IActionMenu.UIActionButtonInfo("移动", BattleAction_Move, chLogic.IsActionEnable(EnumActionType.Move));

        BattleActionMenu.AddAction(move);
    }
Exemple #11
0
 /// <summary>
 /// 不显示其他的Menu
 /// </summary>
 public void UndoShowBattleActionMenu()
 {
     BattleActionMenu.Show();
     BattleSelectWeaponMenu.Hide();
 }
Exemple #12
0
 public void BattleAction_Move()
 {
     BattleActionMenu.Hide();
     battleManager.ChangeState(BattleManager.EBattleState.SelectMove);
     battleManager.ShowMoveRangeAction(battleManager.CurrentCharacterLogic);
 }