Beispiel #1
0
        public void AdvanceTime()
        {
            IScheduleable scheduleable = SchedulingSystem.Get();

            if (scheduleable is Player)
            {
                IsPlayerTurn = true;
            }
            else if (scheduleable is Attack)
            {
                Attack attack = scheduleable as Attack;
                attack.Activate();
                AdvanceTime();
            }
            else if (scheduleable is Monster)
            {
                Monster monster = scheduleable as Monster;
                monster.Activate();
                SchedulingSystem.Add(monster);
                AdvanceTime();
            }
            else if (scheduleable is Update)
            {
                Update update = scheduleable as Update;
                update.Activate();
                SchedulingSystem.Add(update);
                AdvanceTime();
            }
        }