Exemplo n.º 1
0
 public void SetCallbacks(IEditorActions instance)
 {
     if (m_Wrapper.m_EditorActionsCallbackInterface != null)
     {
         @Paint.started            -= m_Wrapper.m_EditorActionsCallbackInterface.OnPaint;
         @Paint.performed          -= m_Wrapper.m_EditorActionsCallbackInterface.OnPaint;
         @Paint.canceled           -= m_Wrapper.m_EditorActionsCallbackInterface.OnPaint;
         @CameraMovement.started   -= m_Wrapper.m_EditorActionsCallbackInterface.OnCameraMovement;
         @CameraMovement.performed -= m_Wrapper.m_EditorActionsCallbackInterface.OnCameraMovement;
         @CameraMovement.canceled  -= m_Wrapper.m_EditorActionsCallbackInterface.OnCameraMovement;
         @Escape.started           -= m_Wrapper.m_EditorActionsCallbackInterface.OnEscape;
         @Escape.performed         -= m_Wrapper.m_EditorActionsCallbackInterface.OnEscape;
         @Escape.canceled          -= m_Wrapper.m_EditorActionsCallbackInterface.OnEscape;
         @Zoom.started             -= m_Wrapper.m_EditorActionsCallbackInterface.OnZoom;
         @Zoom.performed           -= m_Wrapper.m_EditorActionsCallbackInterface.OnZoom;
         @Zoom.canceled            -= m_Wrapper.m_EditorActionsCallbackInterface.OnZoom;
     }
     m_Wrapper.m_EditorActionsCallbackInterface = instance;
     if (instance != null)
     {
         @Paint.started            += instance.OnPaint;
         @Paint.performed          += instance.OnPaint;
         @Paint.canceled           += instance.OnPaint;
         @CameraMovement.started   += instance.OnCameraMovement;
         @CameraMovement.performed += instance.OnCameraMovement;
         @CameraMovement.canceled  += instance.OnCameraMovement;
         @Escape.started           += instance.OnEscape;
         @Escape.performed         += instance.OnEscape;
         @Escape.canceled          += instance.OnEscape;
         @Zoom.started             += instance.OnZoom;
         @Zoom.performed           += instance.OnZoom;
         @Zoom.canceled            += instance.OnZoom;
     }
 }
Exemplo n.º 2
0
 public void SetCallbacks(IEditorActions instance)
 {
     if (m_Wrapper.m_EditorActionsCallbackInterface != null)
     {
         @PlaceElement.started    -= m_Wrapper.m_EditorActionsCallbackInterface.OnPlaceElement;
         @PlaceElement.performed  -= m_Wrapper.m_EditorActionsCallbackInterface.OnPlaceElement;
         @PlaceElement.canceled   -= m_Wrapper.m_EditorActionsCallbackInterface.OnPlaceElement;
         @DeleteElement.started   -= m_Wrapper.m_EditorActionsCallbackInterface.OnDeleteElement;
         @DeleteElement.performed -= m_Wrapper.m_EditorActionsCallbackInterface.OnDeleteElement;
         @DeleteElement.canceled  -= m_Wrapper.m_EditorActionsCallbackInterface.OnDeleteElement;
         @ChangeMode.started      -= m_Wrapper.m_EditorActionsCallbackInterface.OnChangeMode;
         @ChangeMode.performed    -= m_Wrapper.m_EditorActionsCallbackInterface.OnChangeMode;
         @ChangeMode.canceled     -= m_Wrapper.m_EditorActionsCallbackInterface.OnChangeMode;
         @Save.started            -= m_Wrapper.m_EditorActionsCallbackInterface.OnSave;
         @Save.performed          -= m_Wrapper.m_EditorActionsCallbackInterface.OnSave;
         @Save.canceled           -= m_Wrapper.m_EditorActionsCallbackInterface.OnSave;
         @Load.started            -= m_Wrapper.m_EditorActionsCallbackInterface.OnLoad;
         @Load.performed          -= m_Wrapper.m_EditorActionsCallbackInterface.OnLoad;
         @Load.canceled           -= m_Wrapper.m_EditorActionsCallbackInterface.OnLoad;
     }
     m_Wrapper.m_EditorActionsCallbackInterface = instance;
     if (instance != null)
     {
         @PlaceElement.started    += instance.OnPlaceElement;
         @PlaceElement.performed  += instance.OnPlaceElement;
         @PlaceElement.canceled   += instance.OnPlaceElement;
         @DeleteElement.started   += instance.OnDeleteElement;
         @DeleteElement.performed += instance.OnDeleteElement;
         @DeleteElement.canceled  += instance.OnDeleteElement;
         @ChangeMode.started      += instance.OnChangeMode;
         @ChangeMode.performed    += instance.OnChangeMode;
         @ChangeMode.canceled     += instance.OnChangeMode;
         @Save.started            += instance.OnSave;
         @Save.performed          += instance.OnSave;
         @Save.canceled           += instance.OnSave;
         @Load.started            += instance.OnLoad;
         @Load.performed          += instance.OnLoad;
         @Load.canceled           += instance.OnLoad;
     }
 }