protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); string path = System.IO.Path.Combine(Parent.Content.RootDirectory, "Fonts/octin-stencil-100.fnt"); fontTexture = Parent.Content.Load<Texture2D>("Fonts/octin-stencil-100_0.png"); fontFile = FontLoader.Load(path); fontRenderer = new FontRenderer(fontFile, fontTexture); }
protected override void LoadContent() { base.LoadContent(); string path = System.IO.Path.Combine(Parent.Content.RootDirectory, "Fonts/octin-stencil-60.fnt"); ScoreFontTexture = Parent.Content.Load<Texture2D>("Fonts/octin-stencil-60_0.png"); fontFile = FontLoader.Load(path); fontRenderer = new FontRenderer(fontFile, ScoreFontTexture); HitPointBar.LoadContent(); }
protected override void LoadContent() { base.LoadContent(); string path = System.IO.Path.Combine( Parent.Content.RootDirectory, "Fonts/octin-stencil-gameover.fnt"); fontTexture = Parent.Content.Load<Texture2D>("Fonts/octin-stencil-gameover_0.png"); fontFile = FontLoader.Load(path); fontRenderer = new FontRenderer(fontFile, fontTexture); Random rand = new Random(DateTime.Now.Millisecond); for (int i = 0; i < ExplosionsAmount; i++) { Vector2 pos = new Vector2(rand.Next(MaxPositions.X), rand.Next(MaxPositions.Y)); Utils.AnimatedTexture anim = new Utils.AnimatedTexture( Vector2.Zero, 0f, 1f, 0f, new Point(192, 192)); anim.Load(Parent.Content, "explosion.png", 8, 10); anim.Pause(); KeyValuePair<Vector2, Utils.AnimatedTexture> pair = new KeyValuePair<Vector2, Utils.AnimatedTexture>(pos, anim); Explosions.Add(pair); Point res = new Point(Parent.GraphicsDevice.Viewport.Width, Parent.GraphicsDevice.Viewport.Height); HomingScreen = Parent.Content.Load<Texture2D>("HomingTexture.png"); } }