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

Revision 4752, 3.5 KB checked in by dezhidki, 6 years ago (diff)
  • Muokattu AStarin debuggausta
  • Väritetty pelaajien pelinappuloita
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_RED { get; private set; }
11        public static int SPRITESHEET_WARRIOR_RED { get; private set; }
12        public static int SPRITESHEET_RANGER_RED { get; private set; }
13        public static int SPRITESHEET_WOODCUTTER_BLU { get; private set; }
14        public static int SPRITESHEET_WARRIOR_BLU { get; private set; }
15        public static int SPRITESHEET_RANGER_BLU { get; private set; }
16        public static int SPRITE_KING { get; private set; }
17        public static int SPRITE_STORE { get; private set; }
18        public static int SPRITE_ARMORY { get; private set; }
19        public static int SPRITESHEET_HEALTH { get; private set; }
20        public static SpriteFont FONT { get; private set; }
21        public static Texture2D SPRITE_GUI_UNITMENU { get; private set; }
22        public static Texture2D SPRITE_GUI_BACKGROUND { get; private set; }
23        public static Texture2D SPRITE_GUI_LOGO { get; private set; }
24        public static Texture2D SPRITE_GUI_BACKGROUND_INGAME { get; private set; }
25        public static Texture2D SPRITE_GUI_INSCTRUCTIONS { get; private set; }
26
27        public static void LoadResources(ContentManager cm, RenderHelper renderer)
28        {
29            SPRITESHEET_TILES = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("tiles/tilesheet"), 32, 32));
30            SPRITESHEET_ICONS = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("misc/icons"), 16, 16));
31            SPRITESHEET_WOODCUTTER_RED = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/red/woodcutter_red"), 32, 32));
32            SPRITESHEET_WARRIOR_RED = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/red/warrior_red"), 32, 32));
33            SPRITESHEET_RANGER_RED = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/red/archer_red"), 32, 32));
34            SPRITESHEET_WOODCUTTER_BLU = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/blu/woodcutter_blu"), 32, 32));
35            SPRITESHEET_WARRIOR_BLU = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/blu/warrior_blu"), 32, 32));
36            SPRITESHEET_RANGER_BLU = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/blu/archer_blu"), 32, 32));
37            SPRITE_KING = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/king"), 160, 128));
38            SPRITE_ARMORY = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/armory"), 160, 98));
39            SPRITE_STORE = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("mobs/store"), 240, 147));
40            FONT = cm.Load<SpriteFont>("gui/font");
41            SPRITESHEET_HEALTH = renderer.RegisterSpriteSheet(new SpriteSheet(cm.Load<Texture2D>("gui/guiHealth"), 100, 4));
42            SPRITE_GUI_UNITMENU = cm.Load<Texture2D>("gui/guiUnitMenu");
43            SPRITE_GUI_BACKGROUND = cm.Load<Texture2D>("gui/startMenu");
44            SPRITE_GUI_LOGO = cm.Load<Texture2D>("gui/logo");
45            SPRITE_GUI_BACKGROUND_INGAME = cm.Load<Texture2D>("gui/inGameBackGround");
46            SPRITE_GUI_INSCTRUCTIONS = cm.Load<Texture2D>("gui/instructions");
47        }
48    }
49}
Note: See TracBrowser for help on using the repository browser.