private void UndoSelectWeapon() { battleManager.ChangeState(BattleManager.EBattleState.Menu); battleManager.ClearRangeAction(); BattleSelectWeaponMenu.Show(); BattleActionMenu.Hide(); }
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); }
public void HideBattlaActionMenu(bool showMainMenu) { Debug.Log("Hide " + showMainMenu); if (showMainMenu) { ShowBattleMainMenu(); } BattleActionMenu.Hide(); }
public void BattleAction_Attack() { BattleActionMenu.Hide(); //battleManager.ClearRangeAction(); CharacterLogic logic = battleManager.CurrentCharacterLogic; BuildBattleSelectWeaponMenu(logic); BattleSelectWeaponMenu.Show(); MenuUndoAction.Push(UndoShowBattleActionMenu); }
public bool CheckBattleTalkEvent(CharacterLogic chLogic) { IActionMenu.UIActionButtonInfo location = new IActionMenu.UIActionButtonInfo(); if (GetBattleAction_BattleTalk(chLogic, ref location)) { BattleActionMenu.AddAction(location); return(true); } return(false); }
public void ShowBattleActionMenu(EActionMenuState state, CharacterLogic chLogic) { HideBattleMainMenu(); switch (state) { case EActionMenuState.Main: BuildBattleActionMenu_Main(chLogic); break; } eActionMenuState = state; BattleActionMenu.Show(); }
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); }
public void CheckWaitAction(CharacterLogic chLogic) { var end = new IActionMenu.UIActionButtonInfo("待机", BattleAction_End, chLogic.IsActionEnable(EnumActionType.Wait)); BattleActionMenu.AddAction(end); }
public void CheckAttackAction(CharacterLogic chLogic) { var attack = new IActionMenu.UIActionButtonInfo("攻击", BattleAction_Attack, chLogic.IsActionEnable(EnumActionType.Attack)); BattleActionMenu.AddAction(attack); }
public void CheckMoveAction(CharacterLogic chLogic) { var move = new IActionMenu.UIActionButtonInfo("移动", BattleAction_Move, chLogic.IsActionEnable(EnumActionType.Move)); BattleActionMenu.AddAction(move); }
/// <summary> /// 不显示其他的Menu /// </summary> public void UndoShowBattleActionMenu() { BattleActionMenu.Show(); BattleSelectWeaponMenu.Hide(); }
public void BattleAction_Move() { BattleActionMenu.Hide(); battleManager.ChangeState(BattleManager.EBattleState.SelectMove); battleManager.ShowMoveRangeAction(battleManager.CurrentCharacterLogic); }