public void OnChangeWeaponLeft(HotkeyCallback callbackContext) { switch (m_SpacecraftInputProperty.GetMotionType()) { case MotionType.Mmo: case MotionType.Dof4: case MotionType.Dof6: { if (!callbackContext.performed || m_SpacecraftInputProperty.GetCurrentState().IsHasSubState(EnumSubState.Peerless) || //转化炉模式 m_SpacecraftInputProperty.GetCurrentState().GetMainState() != EnumMainState.Fight || //非战斗模式 m_SpacecraftInputProperty.GetCurrSkillId() > 0 //有技能在释放 ) { return; } m_PlayerSkillProxy.ToggleCurrentWeapon(); } break; default: break; } }
public override void Execute(INotification notification) { PlayerSkillProxy skillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; skillProxy.ToggleCurrentWeapon(); }