コード例 #1
0
ファイル: PlayerController.cs プロジェクト: Flargy/Portfolio
 public void SetCallbacks(IQTEActions instance)
 {
     if (m_Wrapper.m_QTEActionsCallbackInterface != null)
     {
         Down.started    -= m_Wrapper.m_QTEActionsCallbackInterface.OnDown;
         Down.performed  -= m_Wrapper.m_QTEActionsCallbackInterface.OnDown;
         Down.canceled   -= m_Wrapper.m_QTEActionsCallbackInterface.OnDown;
         Right.started   -= m_Wrapper.m_QTEActionsCallbackInterface.OnRight;
         Right.performed -= m_Wrapper.m_QTEActionsCallbackInterface.OnRight;
         Right.canceled  -= m_Wrapper.m_QTEActionsCallbackInterface.OnRight;
         Up.started      -= m_Wrapper.m_QTEActionsCallbackInterface.OnUp;
         Up.performed    -= m_Wrapper.m_QTEActionsCallbackInterface.OnUp;
         Up.canceled     -= m_Wrapper.m_QTEActionsCallbackInterface.OnUp;
         Left.started    -= m_Wrapper.m_QTEActionsCallbackInterface.OnLeft;
         Left.performed  -= m_Wrapper.m_QTEActionsCallbackInterface.OnLeft;
         Left.canceled   -= m_Wrapper.m_QTEActionsCallbackInterface.OnLeft;
     }
     m_Wrapper.m_QTEActionsCallbackInterface = instance;
     if (instance != null)
     {
         Down.started    += instance.OnDown;
         Down.performed  += instance.OnDown;
         Down.canceled   += instance.OnDown;
         Right.started   += instance.OnRight;
         Right.performed += instance.OnRight;
         Right.canceled  += instance.OnRight;
         Up.started      += instance.OnUp;
         Up.performed    += instance.OnUp;
         Up.canceled     += instance.OnUp;
         Left.started    += instance.OnLeft;
         Left.performed  += instance.OnLeft;
         Left.canceled   += instance.OnLeft;
     }
 }
コード例 #2
0
 public void SetCallbacks(IQTEActions instance)
 {
     if (m_Wrapper.m_QTEActionsCallbackInterface != null)
     {
         @UpKey.started     -= m_Wrapper.m_QTEActionsCallbackInterface.OnUpKey;
         @UpKey.performed   -= m_Wrapper.m_QTEActionsCallbackInterface.OnUpKey;
         @UpKey.canceled    -= m_Wrapper.m_QTEActionsCallbackInterface.OnUpKey;
         @DownKey.started   -= m_Wrapper.m_QTEActionsCallbackInterface.OnDownKey;
         @DownKey.performed -= m_Wrapper.m_QTEActionsCallbackInterface.OnDownKey;
         @DownKey.canceled  -= m_Wrapper.m_QTEActionsCallbackInterface.OnDownKey;
     }
     m_Wrapper.m_QTEActionsCallbackInterface = instance;
     if (instance != null)
     {
         @UpKey.started     += instance.OnUpKey;
         @UpKey.performed   += instance.OnUpKey;
         @UpKey.canceled    += instance.OnUpKey;
         @DownKey.started   += instance.OnDownKey;
         @DownKey.performed += instance.OnDownKey;
         @DownKey.canceled  += instance.OnDownKey;
     }
 }