Пример #1
0
 public GameState(DoomTacticsGame gameInstance, SquidInputManager squidInputManager)
 {
     GameInstance = gameInstance;
     Desktop = new DoomDesktop();
     SquidInputManager = squidInputManager;
     _stateMachine = new StateMachine(new MatchIntroState(this));
 }
Пример #2
0
        public MenuState(DoomTacticsGame game, SquidInputManager squidInputManager, DoomDesktop desktop)
        {
            _game = game;
            _squidInputManager = squidInputManager;
            _desktop = desktop;
            _desktop.ShowCursor = true;

            InitializeControls();
        }
Пример #3
0
        public RendererXna(DoomTacticsGame game)
        {
            Game = game;
            Batch = new SpriteBatch(game.GraphicsDevice);

            BlankTexture = new Texture2D(Game.GraphicsDevice, 1, 1);
            BlankTexture.SetData<Color>(new Color[] { new Color(255, 255, 255, 255) });

            FontTypes.Add(Squid.Font.Default, new Squid.Font { Name = "Arial10", Family = "Arial", Size = 8, Bold = true, International = true });

            KeyboardLayout = GetKeyboardLayout(0);
            KeyStates = new byte[0x100];

            Rasterizer = new RasterizerState();
            Rasterizer.ScissorTestEnable = true;

            Sampler = new SamplerState();
            Sampler.Filter = TextureFilter.PointMipLinear;
        }
Пример #4
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     bool enableMusic = true;
     bool enableSound = true;
     bool skipLevelIntros = false;
     if (args.Length > 0)
     {
         foreach (var arg in args)
         {
             if (arg == "--nomusic")
                 enableMusic = false;
             else if (arg == "--nosound")
                 enableSound = false;
             else if (arg == "--skipintros")
                 skipLevelIntros = true;
         }
     }
     using (DoomTacticsGame game = new DoomTacticsGame(enableMusic, enableSound, skipLevelIntros))
     {
         game.Run();
     }
 }
Пример #5
0
 public static IState CreateMenuState(DoomTacticsGame gameInstance)
 {
     return new MenuState(gameInstance, _inputManager, _desktop);
 }