Exemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Engine game = new Engine())
     {
         game.Run();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// This is the constructor that should almost always be used
 /// </summary>
 /// <param name="filepath">The path within Content to the .spritefont file, without .spritefont at the end</param>
 /// <param name="spriteBatch">The spriteBatch to be used when drawing text</param>
 /// <param name="engine">The main Engine class</param>
 public GameFont(string filename, SpriteBatch spriteBatch, Engine engine)
 {
     m_spriteBatch = spriteBatch;
     m_font = engine.Content.Load<SpriteFont>(filename);
 }
 public UpdateThread(Engine engine)
 {
     m_engine = engine;
     m_drawBuffer = DrawBuffer.getInstance();
 }
Exemplo n.º 4
0
 internal static void initialize(Engine engine)
 {
     s_instance = new Settings();
     s_instance.Engine = engine;
     s_instance.m_movementType = MovementType.ABSOLUTE;
     s_instance.IsInDebugMode = false;
     s_instance.IsCameraFreeform = false;
     s_instance.IsSoundAllowed = true;
     s_instance.Resolution = Resolution.auto;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Loads SpriteFont information from file
 /// </summary>
 /// <param name="filepath">The .xml file that contains all the Font information</param>
 /// <param name="spriteBatch">The spriteBatch that will be used to draw text</param>
 /// <param name="engine">The main Engine class</param>
 public void loadFonts(string filename, SpriteBatch spriteBatch, Engine engine)
 {
     //TODO: Eventually, create automatic loading of fonts based on an xml file.
     //      For now, just create the load for each font in this function
     m_fonts.Add(FontEnum.Consolas16, new GameFont("SpriteFonts/Consolas16", spriteBatch, engine));
     m_fonts.Add(FontEnum.Kootenay8, new GameFont("SpriteFonts/Kootenay8", spriteBatch, engine));
     m_fonts.Add(FontEnum.Kootenay14, new GameFont("SpriteFonts/Kootenay", spriteBatch, engine));
     m_fonts.Add(FontEnum.Kootenay48, new GameFont("SpriteFonts/Kootenay48", spriteBatch, engine));
     m_fonts.Add(FontEnum.Lindsey, new GameFont("SpriteFonts/Lindsey", spriteBatch, engine));
     m_fonts.Add(FontEnum.Miramonte, new GameFont("SpriteFonts/Miramonte", spriteBatch, engine));
     m_fonts.Add(FontEnum.MiramonteBold, new GameFont("SpriteFonts/MiramonteBold", spriteBatch, engine));
     m_fonts.Add(FontEnum.Pericles, new GameFont("SpriteFonts/Pericles", spriteBatch, engine));
     m_fonts.Add(FontEnum.PericlesLight, new GameFont("SpriteFonts/PericlesLight", spriteBatch, engine));
     m_fonts.Add(FontEnum.Pescadero, new GameFont("SpriteFonts/Pescadero", spriteBatch, engine));
     m_fonts.Add(FontEnum.PescaderoBold, new GameFont("SpriteFonts/PescaderoBold", spriteBatch, engine));
 }