예제 #1
0
 public DebugManager(Game game, Camera camera, ChunkCache chunkCache, SpriteFont debugFont)
     : base(game)
 {
     m_graphs = new GraphManager(game);
     m_debugger = new InGameDebugger(game, camera);
     var statistics = new Statistics(game, chunkCache);
     m_components = new GameComponentCollection
     {
         m_debugger,
         new DebugBar(game, statistics, chunkCache),
         statistics,
         m_graphs,
         new GameConsole(game,  new SpriteBatch(game.GraphicsDevice), new GameConsoleOptions
         {
             Font = debugFont,
             FontColor = Color.LawnGreen,
             Prompt = ">",
             PromptColor = Color.Crimson,
             CursorColor = Color.OrangeRed,
             BackgroundColor = Color.Black*0.8f,
             PastCommandOutputColor = Color.Aqua,
             BufferColor = Color.Gold
         }, m_debugger.ToggleInGameDebugger)
     };
 }
예제 #2
0
 public Simulation(Game game, uint seed)
     : base(game)
 {
     m_fogVector = new Vector2(Chunk.SizeInBlocks * ChunkCache.ViewRange, Chunk.SizeInBlocks * (ChunkCache.ViewRange + 4));
     m_worldComponents = new List<Renderable>();
     m_chunkCache = new ChunkCache(game);
     m_worldComponents.Add(m_chunkCache);
     m_worldComponents.Add(new Sky(game, seed));
     m_player = new Player(ChunkCache.Blocks, ChunkCache.BlockIndexByWorldPosition);
     m_worldComponents.Add(m_player);
 }
예제 #3
0
 public DebugBar(Game game, Statistics statistics, ChunkCache chunkCache)
     : base(game)
 {
     m_chunkCache = chunkCache;
     m_statistics = statistics;
 }