void Start()
    {
        GameEvents.AddGameStateEnteredListener(GameStateEnteredListener);

        GameEvents.AddListener <BonusTokenData>(EGameEvent.CollectedBonusToken, OnCollectedBonusToken);

        LoadWorldMap(1);
    }
Exemple #2
0
        public void Setup()
        {
            if (!GameEvents)
            {
                // create observer
                GameEvents = new GameObject("GameEvents").AddComponent <GameEvents>();

                //subscribe
                GameEvents.AddListener(this);
            }
        }
Exemple #3
0
	public override void AddEvents() {
		GameEvents.AddListener(GameEnums.BED_ENTER, OnBedEnter);
		GameEvents.AddListener(GameEnums.BED_EXIT, OnBedExit);
	}