public void SetCallbacks(IHubActions instance) { if (m_Wrapper.m_HubActionsCallbackInterface != null) { @Movement.started -= m_Wrapper.m_HubActionsCallbackInterface.OnMovement; @Movement.performed -= m_Wrapper.m_HubActionsCallbackInterface.OnMovement; @Movement.canceled -= m_Wrapper.m_HubActionsCallbackInterface.OnMovement; @Jump.started -= m_Wrapper.m_HubActionsCallbackInterface.OnJump; @Jump.performed -= m_Wrapper.m_HubActionsCallbackInterface.OnJump; @Jump.canceled -= m_Wrapper.m_HubActionsCallbackInterface.OnJump; @Dash.started -= m_Wrapper.m_HubActionsCallbackInterface.OnDash; @Dash.performed -= m_Wrapper.m_HubActionsCallbackInterface.OnDash; @Dash.canceled -= m_Wrapper.m_HubActionsCallbackInterface.OnDash; } m_Wrapper.m_HubActionsCallbackInterface = instance; if (instance != null) { @Movement.started += instance.OnMovement; @Movement.performed += instance.OnMovement; @Movement.canceled += instance.OnMovement; @Jump.started += instance.OnJump; @Jump.performed += instance.OnJump; @Jump.canceled += instance.OnJump; @Dash.started += instance.OnDash; @Dash.performed += instance.OnDash; @Dash.canceled += instance.OnDash; } }
public LogHub( IWorkerController workerController, IDataStore dataStore, IHubActions <LogEntry> userHubActions) { WorkerController = workerController; DataStore = dataStore; LogHubActions = userHubActions; }
public TargetHub( IWorkerController workerController, IDataStore dataStore, IHubActions <Target> targetHubActions) { WorkerController = workerController; DataStore = dataStore; TargetHubActions = targetHubActions; }
public UserHub( IWorkerController workerController, IDataStore dataStore, IHubActions <User> userHubActions) { WorkerController = workerController; DataStore = dataStore; UserHubActions = userHubActions; }
private async Task Add <T>(T entity, IHubActions <T> hub) where T : IDataObject { var store = DataStore.Get <T>(); await store.Add(entity); await hub.Add(entity); }
public WebController( IDataStore dataStore, IWorkerSettings workerSettings, IHubActions <Target> targetHubActions, IHubActions <User> userHubActions, IHubActions <LogEntry> logHubActions) { DataStore = dataStore; TargetHubActions = targetHubActions; UserHubActions = userHubActions; LogHubActions = logHubActions; WorkerSettings = workerSettings; Tools = new Dictionary <Type, IActionModule>(); }