コード例 #1
0
 public ConsoleWindow(Game game, SceneManager sceneManager)
     : base(game)
 {
     this.sceneManager     = sceneManager;
     this.drawing2D        = new Drawing2D(game.GraphicsDevice);
     this.bounds           = new Rectangle(0, 0, Game.GraphicsDevice.Viewport.Bounds.Width, Game.GraphicsDevice.Viewport.Bounds.Height / 4);
     this.backgroundColor  = Color.Black * 0.8f;
     this.lineSpacing      = 18;
     this.maxLinesToRender = bounds.Height / lineSpacing;
     this.inputBuffer      = "";
     this.Visible          = false;
 }
コード例 #2
0
        /// <summary>
        /// Init the game engine. This should be the first thing to call in
        /// the LoadContent method.
        /// </summary>
        /// <param name="_game"></param>
        public static void Init(Game _game, int _renderWith, int _renderHeight, bool _useScanlines)
        {
            game         = _game;
            RenderWidth  = _renderWith;
            RenderHeight = _renderHeight;

            UseScanlines             = _useScanlines;
            random                   = new Random(DateTime.Now.TimeOfDay.Milliseconds);
            input                    = new Input();
            soundEffectCache         = new List <SoundEffect>();
            texture2DCache           = new List <Texture2D>();
            shaderCache              = new List <Effect>();
            bitmapFontCache          = new List <BitmapFont>();
            SpriteBatch              = new SpriteBatch(game.GraphicsDevice);
            SceneManager             = new SceneManager(game);
            SaveDataManager          = new SaveDataManager();
            SosEngine.Core.ModPlayer = new SosEngine.ModPlayer();
            SpriteFrameCache         = new SpriteFrameCache();
            drawing2D                = new Drawing2D(game.GraphicsDevice);
            Mouse.WindowHandle       = game.Window.Handle;
            game.IsMouseVisible      = Debug;
            logHistory               = new List <string>();
        }