void InitEventTriggers(bool register = true) { if (register) { if (pubInstance == null) { pubInstance = EventPublisherListener.Instance; if (pubInstance == null) { Debug.Log(" Unable to load EventPublisherListener"); } } pubInstance.Register("AssignedCross", this.AssignedCross); pubInstance.Register("AssignedNot", this.AssignedNot); pubInstance.Register("ResetGame", this.ResetGame); pubInstance.Register("TogglePlayer", this.TogglePlayer); pubInstance.Register("GameOverInteractive", this.GameOverInteractive); } else if (pubInstance != null) { pubInstance.UnRegister("AssignedCross", this.AssignedCross); pubInstance.UnRegister("AssignedNot", this.AssignedNot); pubInstance.UnRegister("ResetGame", this.ResetGame); pubInstance.UnRegister("TogglePlayer", this.TogglePlayer); pubInstance.UnRegister("GameOverInteractive", this.GameOverInteractive); } }
void InitEventTriggers(bool register = true) { if (register) { if (pubInstance == null) { pubInstance = EventPublisherListener.Instance; if (pubInstance == null) { Debug.Log(" Unable to load EventPublisherListener"); } } pubInstance.Register("StartGame", this.StartGame); pubInstance.Register("AssignedCross", this.AssignedCross); pubInstance.Register("AssignedNot", this.AssignedNot); pubInstance.Register("AgentReset", this.ResetAgent); } else if (pubInstance != null) { pubInstance.UnRegister("StartGame", this.StartGame); pubInstance.UnRegister("AssignedCross", this.AssignedCross); pubInstance.UnRegister("AssignedNot", this.AssignedNot); pubInstance.UnRegister("AgentReset", this.ResetAgent); } }
protected void InitPubInstance( ) { if (pubInstance == null) { pubInstance = EventPublisherListener.Instance; } }
void InitEventTriggers(bool register = true) { if (register) { if (pubInstance == null) { pubInstance = EventPublisherListener.Instance; if (pubInstance == null) { Debug.Log(" Unable to load EventPublisherListener"); } } //Write register functions here, if applicable } else if (pubInstance != null) { //Write Unregister functions here, if applicable } }