Ejemplo n.º 1
0
        public Game()
        {
            mainStateMachine = new StateMachine(true);
            mainStateMachine.AddState(new States.TitleScreen());

            //player = new Actor();
            //MapReader mr = new MapReader();
            //Map map = mr.Read("resources/map_0_0.bmp");

            //for (int y = 0; y < map.Height; y++)
            //{
            //    for (int x = 0; x < map.Width; x++)
            //    {
            //        if (map.GetRoom(x, y).Type == Room.RoomType.Wall)
            //        {
            //            //Print("#", ConsoleColor.DarkYellow);
            //            Console.Write("#");
            //        }
            //        else
            //        {
            //            Console.Write(" ");
            //        }
            //    }
            //    Console.WriteLine();
            //}
            mainStateMachine.SetLooped(false);
            while (!mainStateMachine.finished)
            {
                Update();
                Draw();
            }
            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public override void Draw(StateMachine.Stage stage)
 {
     if (stage == StateMachine.Stage.During)
     {
         Console.Clear();
         switch (creationStep)
         {
             case CreationStep.Name:
                 IO.Print("Please enter your #C0name|: ");
                 break;
             case CreationStep.Class:
                 RenderClassMenu(selectedItem);
                 break;
             case CreationStep.Stats:
                 RenderStatsMenu();
                 break;
             default:
                 throw new ArgumentOutOfRangeException();
         }
     }
 }