Ejemplo n.º 1
0
        public void CheckDistanceSimple()
        {
            var distance = SeasonName.Distance(SeasonName.Winter, SeasonName.Spring);

            Assert.AreEqual(distance, 1);
        }
Ejemplo n.º 2
0
        public void CheckDistanceWrapAround()
        {
            var distance = SeasonName.Distance(SeasonName.Fall, SeasonName.Winter);

            Assert.AreEqual(distance, 1);
        }
Ejemplo n.º 3
0
 void OnPlayerEnteredAreaEvent(PlayerEnteredAreaEvent evt) {
     if(this.currentSeason != SeasonName.None) {
         var distance = SeasonName.Distance(this.currentSeason, evt.seasonName);
         EventManager.FireEvent(new ItemWaitedEvent(this.gameObject, distance));
     }
 }