예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        GameEventManager gameEventManager = EasyGetter.GetGameEventManager();

        gameEventManager.AddEvent(GameEventType.UpArrowHit, upArrowHit);
        gameEventManager.AddEvent(GameEventType.DownArrowHit, downArrowHit);
        gameEventManager.AddEvent(GameEventType.LeftArrowHit, leftArrowHit);
        gameEventManager.AddEvent(GameEventType.RightArrowHit, rightArrowHit);
        gameEventManager.AddEvent(GameEventType.EscHit, escHit);
        testAddListener(gameEventManager);
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        GameEventManager gameEventManager = EasyGetter.GetGameEventManager();

        resumeEvent = new EscHit();
        gameEventManager.AddEvent(GameEventType.EscHit, resumeEvent);
    }
 internal void InjectEventsInto(GameEventManager manager)
 {
     foreach (var @event in events)
     {
         manager.AddEvent((BaseGameEvent)@event.GetConstructor(Type.EmptyTypes).Invoke(null));
     }
 }