Esempio n. 1
0
        public void TestInitialize()
        {
            m_Updater = new Updater();
            UpdaterProxy.Open(m_Updater);
            m_EventManager = new GameEventManager();

            GameEventManagerProxy.Open(m_EventManager);
        }
Esempio n. 2
0
 void CloseProxies()
 {
     SoundManagerProxy.Close(m_SoundManager);
     LevelManagerProxy.Close(m_LevelManager);
     InputManagerProxy.Close(m_InputManager);
     GameEventManagerProxy.Close(m_GameEventManager);
     UpdaterProxy.Close(m_Updater);
     LoggerProxy.Close(m_Logger);
 }
Esempio n. 3
0
 void OpenProxies()
 {
     LoggerProxy.Open(m_Logger);
     UpdaterProxy.Open(m_Updater);
     GameEventManagerProxy.Open(m_GameEventManager);
     InputManagerProxy.Open(m_InputManager);
     LevelManagerProxy.Open(m_LevelManager);
     SoundManagerProxy.Open(m_SoundManager);
 }
Esempio n. 4
0
    // This should be called before any other gameobject awakes
    private void Awake ()
    {
        // Singleton pattern : this is the only case where it should be used
        if(ms_Instance == null)
        {
            ms_Instance = this;
            DontDestroyOnLoad (gameObject);
            
            // Keep the Updater first, as the other members might want to register to it
            m_Logger = new UnityLogger ();
            LoggerProxy.Open (m_Logger);
            m_Updater = new Updater ();
            UpdaterProxy.Open (m_Updater);
            m_GameEventManager = new GameEventManager ();
            GameEventManagerProxy.Open (m_GameEventManager);
            m_InputManager = new InputManager ();
            InputManagerProxy.Open (m_InputManager);
            m_LevelManager = new LevelManager ();
            LevelManagerProxy.Open (m_LevelManager);
            m_TileManager = new TileManager ();
            TileManagerProxy.Open (m_TileManager);
            m_CommandStack = new CommandStack ();
            CommandStackProxy.Open (m_CommandStack);
            m_GoalManager = new GoalManager ();
            GoalManagerProxy.Open (m_GoalManager);
            m_SoundManager = new SoundManager ();
            SoundManagerProxy.Open (m_SoundManager);
            m_SoundManager.SetMusicSource (m_MusicSource);
            m_SoundManager.SetFXSource (m_EfxSource);

            m_GameFlowHSM = new GameFlowHSM ();
            m_GameFlowHSM.Start (typeof (GameFlowMenuState));
        }
        else if (ms_Instance != this)
        {
            Destroy (gameObject);
            return;
        }
    }
Esempio n. 5
0
 public void TestCleanup()
 {
     GameEventManagerProxy.Close();
     UpdaterProxy.Close();
 }
 public void TestInitialize()
 {
     UpdaterProxy.Open(m_Updater);
     GameEventManagerProxy.Open(m_EventManager);
 }
Esempio n. 7
0
 public static void UnregisterAsListener(this System.Object objectToNotify, string tag)
 {
     GameEventManagerProxy.Get().Unregister(objectToNotify, tag);
 }
Esempio n. 8
0
 public static void RegisterAsListener(this System.Object objectToNotify, string tag, params System.Type[] GameEventTypes)
 {
     GameEventManagerProxy.Get().Register(objectToNotify, tag, GameEventTypes);
 }
Esempio n. 9
0
 public void Push()
 {
     GameEventManagerProxy.Get().PushGameEvent(this, m_Protocol);
 }