sneak/Shared/Textures.cs

112 lines
6.0 KiB
C#
Raw Normal View History

using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System.Collections.Generic;
namespace SemiColinGames {
public class TextureRef {
private static readonly List<TextureRef> allTextures = new List<TextureRef>();
public static void LoadAll(ContentManager content) {
foreach (TextureRef texture in allTextures) {
texture.Load(content);
}
}
private readonly string contentPath;
public TextureRef(string contentPath) {
allTextures.Add(this);
this.contentPath = contentPath;
}
public Texture2D Get { get; private set; }
private void Load(ContentManager content) {
Get = content.Load<Texture2D>(contentPath);
}
}
public static class Textures {
public static SpriteFont DebugFont;
public static SpriteFont BannerFont;
// Character spritesheets.
public static TextureRef Executioner = new TextureRef("sprites/ccg/executioner_female");
public static TextureRef Ninja = new TextureRef("sprites/ccg/ninja_female");
// UI sprites.
public static TextureRef Heart = new TextureRef("sprites/semicolin/heart");
2020-11-19 19:44:12 +00:00
// Ship sprites.
2020-11-19 20:25:54 +00:00
public static TextureRef Blue1 = new TextureRef("sprites/dylestorm/Blue-1");
public static TextureRef Blue2 = new TextureRef("sprites/dylestorm/Blue-2");
public static TextureRef Blue3 = new TextureRef("sprites/dylestorm/Blue-3");
public static TextureRef Blue4 = new TextureRef("sprites/dylestorm/Blue-4");
public static TextureRef Blue5 = new TextureRef("sprites/dylestorm/Blue-5");
public static TextureRef DarkGrey1 = new TextureRef("sprites/dylestorm/DarkGrey-1");
public static TextureRef DarkGrey2 = new TextureRef("sprites/dylestorm/DarkGrey-2");
public static TextureRef DarkGrey3 = new TextureRef("sprites/dylestorm/DarkGrey-3");
public static TextureRef DarkGrey4 = new TextureRef("sprites/dylestorm/DarkGrey-4");
public static TextureRef DarkGrey5 = new TextureRef("sprites/dylestorm/DarkGrey-5");
public static TextureRef Green1 = new TextureRef("sprites/dylestorm/Green-1");
public static TextureRef Green2 = new TextureRef("sprites/dylestorm/Green-2");
public static TextureRef Green3 = new TextureRef("sprites/dylestorm/Green-3");
public static TextureRef Green4 = new TextureRef("sprites/dylestorm/Green-4");
public static TextureRef Green5 = new TextureRef("sprites/dylestorm/Green-5");
public static TextureRef Purple1 = new TextureRef("sprites/dylestorm/Purple-1");
public static TextureRef Purple2 = new TextureRef("sprites/dylestorm/Purple-2");
public static TextureRef Purple3 = new TextureRef("sprites/dylestorm/Purple-3");
public static TextureRef Purple4 = new TextureRef("sprites/dylestorm/Purple-4");
public static TextureRef Purple5 = new TextureRef("sprites/dylestorm/Purple-5");
public static TextureRef Red1 = new TextureRef("sprites/dylestorm/Red-1");
public static TextureRef Red2 = new TextureRef("sprites/dylestorm/Red-2");
public static TextureRef Red3 = new TextureRef("sprites/dylestorm/Red-3");
public static TextureRef Red4 = new TextureRef("sprites/dylestorm/Red-4");
public static TextureRef Red5 = new TextureRef("sprites/dylestorm/Red-5");
2020-11-19 19:44:12 +00:00
public static TextureRef SilverBlue1 = new TextureRef("sprites/dylestorm/SilverBlue-1");
2020-11-19 20:25:54 +00:00
public static TextureRef SilverBlue2 = new TextureRef("sprites/dylestorm/SilverBlue-2");
public static TextureRef SilverBlue3 = new TextureRef("sprites/dylestorm/SilverBlue-3");
public static TextureRef SilverBlue4 = new TextureRef("sprites/dylestorm/SilverBlue-4");
public static TextureRef SilverBlue5 = new TextureRef("sprites/dylestorm/SilverBlue-5");
public static TextureRef Yellow1 = new TextureRef("sprites/dylestorm/Yellow-1");
public static TextureRef Yellow2 = new TextureRef("sprites/dylestorm/Yellow-2");
public static TextureRef Yellow3 = new TextureRef("sprites/dylestorm/Yellow-3");
public static TextureRef Yellow4 = new TextureRef("sprites/dylestorm/Yellow-4");
public static TextureRef Yellow5 = new TextureRef("sprites/dylestorm/Yellow-5");
2020-11-19 22:03:45 +00:00
public static TextureRef Projectile1 = new TextureRef("sprites/dylestorm/projectile02-1");
public static TextureRef Projectile2 = new TextureRef("sprites/dylestorm/projectile02-2");
public static TextureRef Projectile3 = new TextureRef("sprites/dylestorm/projectile02-3");
public static TextureRef Projectile4 = new TextureRef("sprites/dylestorm/projectile02-4");
public static TextureRef Projectile5 = new TextureRef("sprites/dylestorm/projectile02-5");
2020-11-19 19:44:12 +00:00
// Backgrounds are indexed by draw order; the first element should be drawn furthest back.
public static TextureRef[] Backgrounds = new TextureRef[] {
new TextureRef("backgrounds/szadiart/pf4/background1_day"),
new TextureRef("backgrounds/szadiart/pf4/background2a_day"),
new TextureRef("backgrounds/szadiart/pf4/background3_day"),
new TextureRef("backgrounds/szadiart/pf4/background4_day"),
};
// Background tiles.
public static TextureRef Cemetery = new TextureRef("tiles/anokolisa/cemetery");
public static TextureRef Crypt = new TextureRef("tiles/anokolisa/crypt");
public static TextureRef Dungeon = new TextureRef("tiles/anokolisa/dungeon");
public static TextureRef Forest = new TextureRef("tiles/anokolisa/forest");
public static TextureRef Garden = new TextureRef("tiles/anokolisa/garden");
public static TextureRef Grassland = new TextureRef("tiles/anokolisa/grassland");
public static TextureRef Ruins = new TextureRef("tiles/anokolisa/ruins");
public static TextureRef Sewer = new TextureRef("tiles/anokolisa/sewer");
public static TextureRef Temple = new TextureRef("tiles/anokolisa/temple");
public static TextureRef Village = new TextureRef("tiles/anokolisa/village");
public static void Load(ContentManager content) {
DebugFont = content.Load<SpriteFont>("fonts/debug");
BannerFont = content.Load<SpriteFont>("fonts/banner");
TextureRef.LoadAll(content);
}
}
}