コード例 #1
0
ファイル: GameController.cs プロジェクト: Scoots/HeroGame
		private void Awake()
		{
			if (Instance == null)
			{
				Instance = this;
				DontDestroyOnLoad(gameObject);

				LogManager.IsEnabled = true;

				// Setup the Unity Logger!
				//LogManager.AttachLogTarget(new UnityTarget(Logger.Level.Trace, Logger.Level.Error, true));

				StartupTime = DateTime.Now;

				Loader = new DataLoader();
				Loader.DataLoadPath = Application.dataPath;
				Loader.LoadAll();

				// This will pull the player data, after we have instantiated all available cards
				PlayerProfile profile = new PlayerProfile();

				// Losd the Board Scene into the world!
				Application.LoadLevelAdditive("UI");
				Application.LoadLevelAdditive("BoardScene");

				InitializeControllers();

                _eventManager = new EventManager();
                Events = _eventManager; 

				_currentGameState = GameState.Invalid;
			}
		}
コード例 #2
0
ファイル: GameController.cs プロジェクト: Scoots/HeroGame
		private void OnGameStateChange(GameState from, GameState to)
		{
			if (from == to)
			{
				return;
			}

			foreach (Controller c in mControllers)
			{
				c.OnGameStateChange(from, to);
			}

		}