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

Revision 4703, 2.6 KB checked in by dezhidki, 6 years ago (diff)

Talletus.

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        public static Texture2D SPRITE_GUI_BACKGROUND { get; private set; }
20        public static Texture2D SPRITE_GUI_LOGO { get; private set; }
21        public static Texture2D SPRITE_GUI_BACKGROUND_INGAME { get; private set; }
22
23        public static void LoadResources(ContentManager cm, RenderHelper renderer)
24        {
25            SPRITESHEET_TILES = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("tiles/tilesheet"), 32, 32));
26            SPRITESHEET_ICONS = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("misc/icons"), 16, 16));
27            SPRITESHEET_WOODCUTTER = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/woodcutter"), 32, 32));
28            SPRITESHEET_WARRIOR = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/warrior"), 32, 32));
29            SPRITESHEET_RANGER = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/archer"), 32, 32));
30            SPRITE_KING = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/king"), 160, 128));
31            SPRITE_ARMORY = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/armory"), 160, 98));
32            SPRITE_STORE = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/store"), 240, 147));
33            FONT = cm.Load<SpriteFont>("gui/font");
34            SPRITESHEET_HEALTH = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("gui/guiHealth"), 100, 4));
35            SPRITE_GUI_UNITMENU = cm.Load<Texture2D>("gui/guiUnitMenu");
36            SPRITE_GUI_BACKGROUND = cm.Load<Texture2D>("gui/startMenu");
37            SPRITE_GUI_LOGO = cm.Load<Texture2D>("gui/logo");
38            SPRITE_GUI_BACKGROUND_INGAME = cm.Load<Texture2D>("gui/inGameBackGround");
39        }
40    }
41}
Note: See TracBrowser for help on using the repository browser.