Пример #1
0
 public AbstractGraphics(int width, int height, IFontEngine fontEngine, DebugOptions debugOptions = null)
 {
     this.width        = width;
     this.height       = height;
     this.fontEngine   = fontEngine;
     viewWidth         = width;
     viewHeight        = height;
     viewScale         = 1.0f;
     this.debugOptions = debugOptions ?? new DebugOptions();
     states            = new List <GraphicsState>();
 }
Пример #2
0
 public Engine(IFileResolver fileResolver, IGraphics graphics, IFontEngine fonts, ISounds sounds = null)
 {
     this.fileResolver = fileResolver;
     this.graphics     = graphics;
     this.fonts        = fonts;
     this.sounds       = sounds;
     if (sounds == null)
     {
         this.sounds = new NoSounds();
     }
     timeProvider    = new StopWatchTimeInfoProvider();
     input           = new BasicInput();
     textureManager  = new ResourceManager <Texture>();
     tileSetManager  = new ResourceManager <TileSet>();
     musicManager    = new ResourceManager <Music>();
     soundManager    = new ResourceManager <Sound>();
     eventManager    = new EventManager(this);
     entityManager   = new EntityManager(this);
     enemyManager    = new EnemyManager(this);
     campaignManager = new CampaignManager();
     currentScreen   = new NullScreen(this);
     mapScreen       = new MapScreen(this);
     loadScreen      = new LoadScreen(this);
     splashScreen    = new SplashScreen(this);
     titleScreen     = new TitleScreen(this);
     exitScreen      = new ExitScreen(this);
     testScreen      = new TestScreen(this);
     map             = MapFactory.MakeNullMap(this);
     camera          = new Camera(this, map);
     frameCounter    = new FrameCounter();
     loaders         = new List <ILoader>();
     loaders.Add(new XmlLoader(this));
     loaders.Add(new IniLoader(this));
     savers = new List <ISaver>();
     savers.Add(new IniSaver(this));
     savers.Add(new XmlSaver(this));
     nextEnemyTemplates = new List <string>();
 }
Пример #3
0
 public GDIGraphics(int width, int height, IFontEngine fontEngine, DebugOptions debugOptions = null)
     : base(width, height, fontEngine, debugOptions)
 {
     InitPensAndFonts();
 }
Пример #4
0
 public MONOGraphics(MONOGame game, int width, int height, IFontEngine fontEngine, DebugOptions debugOptions = null)
     : base(width, height, fontEngine, debugOptions)
 {
     this.game = game;
 }