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); }
/// <summary> /// 不显示其他的Menu /// </summary> public void UndoShowBattleActionMenu() { BattleActionMenu.Show(); BattleSelectWeaponMenu.Hide(); }