예제 #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();
            }
        }
예제 #2
0
        public GameController(int maxMapWidth, int maxMapHeight)
        {
            Maps             = new List <DungeonMap>();
            MessageLog       = new MessageLog();
            SchedulingSystem = new SchedulingSystem();
            Timeline         = new Timeline();
            InventorySystem  = new InventorySystem();

            MAXMAPWIDTH  = maxMapWidth;
            MAXMAPHEIGHT = maxMapHeight;
        }