Esempio n. 1
0
    void Start()
    {
        GameEvents.AddGameStateEnteredListener(GameStateEnteredListener);

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

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

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