Ejemplo n.º 1
0
        public static void HandleAny(Events.Types type, Scenes.Types scene = Scenes.Types.Unknown)
        {
            switch (scene)
            {
            case Scenes.Types.Start:
                StartHandler.Handle(type);
                break;

            case Scenes.Types.Level:
                LevelHandler.Handle(type);
                break;

            case Scenes.Types.Result:
                ResultHandler.Handle(type);
                break;

            case Scenes.Types.Shop:
                ShopHandler.Handle(type);
                break;

            case Scenes.Types.Unknown:
                Handle(type);
                break;

            default:
                Debug.Log(String.Format("Can't find scene type \"{0}\"", scene));
                break;
            }
        }
Ejemplo n.º 2
0
        public static void LaunchEvent(Events.Types type, Scenes.Types scene = Scenes.Types.Unknown)
        {
            mEvents.Enqueue(new GameEvent(type, scene, EventHandler));

            if (!mIsQueueLaunching)
            {
                LaunchNextEvent();
            }
        }
Ejemplo n.º 3
0
 private static void EventHandler(Events.Types type, Scenes.Types scene = Scenes.Types.Unknown)
 {
     GeneralHandler.HandleAny(type, scene);
     LaunchNextEvent();
 }
Ejemplo n.º 4
0
 public GameEvent(Events.Types type, Scenes.Types scene, gameEvent handle)
 {
     mEventType = type;
     mSceneType = scene;
     mEvent    += handle;
 }