public void EventSystemBaseTestSimplePasses() { //Check that the event system is empty Assert.True(CEventSystem.Count == 0); //create an event, add it to the system, and check the count TestEventObject testEvent = new TestEventObject(); CEventSystem.AddEventHandler(category.category, category.subcategory, testEvent); Assert.True(CEventSystem.Count == 1); //Check the state of the test class after broadcasting a set true, set false, and foo event Assert.True(!testEvent.State); CEventSystem.BroadcastEvent(category.category, category.subcategory, new SetTrueEvent()); Assert.True(testEvent.State); CEventSystem.BroadcastEvent(category.category, category.subcategory, new SetFalseEvent()); Assert.True(!testEvent.State); CEventSystem.BroadcastEvent(category.category, category.subcategory, new FooEvent()); Assert.True(!testEvent.State); //remove the event, check the count of the system. CEventSystem.RemoveEventHandler(category.category, category.subcategory, testEvent); Assert.True(CEventSystem.Count == 0); }
private void Awake() { CEventSystem.AddEventHandler(EventChannel.input, EventSubChannel.player1, this); CEventSystem.AddEventHandler(EventChannel.gameState, EventSubChannel.none, this); instance = this; }
void Awake() { CEventSystem.AddEventHandler(EventChannel.gameState, EventSubChannel.none, this); }
void Awake() { CEventSystem.AddEventHandler(EventChannel.gameState, EventSubChannel.none, this); //tween = gameObject.AddComponent<AsymtoticTweener>(); }
private void Awake() { CEventSystem.AddEventHandler(EventChannel.sound, EventSubChannel.none, this); }