source: 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Graphics/Resources.cs @ 4694

Revision 4694, 2.2 KB checked in by dezhidki, 7 years ago (diff)

Guit lisätty, AIn viimestely.

Line 
1using Microsoft.Xna.Framework.Content;
2using Microsoft.Xna.Framework.Graphics;
3
4namespace CastleMaster.Graphics
5{
6    public static class Resources
7    {
8        public static int SPRITESHEET_TILES { get; private set; }
9        public static int SPRITESHEET_ICONS { get; private set; }
10        public static int SPRITESHEET_WOODCUTTER { get; private set; }
11        public static int SPRITESHEET_WARRIOR { get; private set; }
12        public static int SPRITESHEET_RANGER { get; private set; }
13        public static int SPRITE_KING { get; private set; }
14        public static int SPRITE_STORE { get; private set; }
15        public static int SPRITE_ARMORY { get; private set; }
16        public static int SPRITESHEET_HEALTH { get; private set; }
17        public static SpriteFont FONT { get; private set; }
18        public static Texture2D SPRITE_GUI_UNITMENU { get; private set; }
19
20        public static void LoadResources(ContentManager cm, RenderHelper renderer)
21        {
22            SPRITESHEET_TILES = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("tiles/tilesheet"), 32, 32));
23            SPRITESHEET_ICONS = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("misc/icons"), 16, 16));
24            SPRITESHEET_WOODCUTTER = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/woodcutter"), 32, 32));
25            SPRITESHEET_WARRIOR = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/warrior"), 32, 32));
26            SPRITESHEET_RANGER = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/archer"), 32, 32));
27            SPRITE_KING = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/king"), 160, 128));
28            SPRITE_ARMORY = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/armory"), 160, 98));
29            SPRITE_STORE = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/store"), 240, 147));
30            FONT = cm.Load<SpriteFont>("gui/font");
31            SPRITESHEET_HEALTH = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("gui/guiHealth"), 100, 4));
32            SPRITE_GUI_UNITMENU = cm.Load<Texture2D>("gui/guiUnitMenu");
33        }
34    }
35}
Note: See TracBrowser for help on using the repository browser.