Exemplo n.º 1
0
 private void Uninitialize()
 {
     if (m_GameplayActionsCallbackInterface != null)
     {
         gameplay.SetCallbacks(null);
     }
     m_gameplay          = null;
     m_gameplay_Movement = null;
     m_gameplay_Weapon1  = null;
     m_gameplay_Weapon2  = null;
     m_gameplay_Jump     = null;
     m_gameplay_Dodge    = null;
     m_gameplay_Pause    = null;
     if (m_MenuNavigationActionsCallbackInterface != null)
     {
         MenuNavigation.SetCallbacks(null);
     }
     m_MenuNavigation                   = null;
     m_MenuNavigation_PointAction       = null;
     m_MenuNavigation_MoveAction        = null;
     m_MenuNavigation_SubmitAction      = null;
     m_MenuNavigation_CancelAction      = null;
     m_MenuNavigation_LeftClickAction   = null;
     m_MenuNavigation_MiddleClickAction = null;
     m_MenuNavigation_RightClickAction  = null;
     m_MenuNavigation_ScrollWheelAction = null;
     m_Initialized = false;
 }
Exemplo n.º 2
0
    public void SetAsset(InputActionAsset newAsset)
    {
        if (newAsset == asset)
        {
            return;
        }
        var gameplayCallbacks       = m_GameplayActionsCallbackInterface;
        var MenuNavigationCallbacks = m_MenuNavigationActionsCallbackInterface;

        if (m_Initialized)
        {
            Uninitialize();
        }
        asset = newAsset;
        gameplay.SetCallbacks(gameplayCallbacks);
        MenuNavigation.SetCallbacks(MenuNavigationCallbacks);
    }