Beispiel #1
0
    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;
        }
    }
Beispiel #2
0
    public override void Execute(INotification notification)
    {
        PlayerSkillProxy skillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy;

        skillProxy.ToggleCurrentWeapon();
    }