2020-02-19 16:19:23 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
|
|
2020-02-20 21:36:54 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2020-02-19 16:19:23 +00:00
|
|
|
|
namespace SemiColinGames {
|
2020-02-20 21:36:54 +00:00
|
|
|
|
|
2020-02-28 00:13:34 +00:00
|
|
|
|
public class TextureRef {
|
2020-02-20 21:36:54 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-24 18:48:14 +00:00
|
|
|
|
public Texture2D Get { get; private set; }
|
2020-02-20 21:36:54 +00:00
|
|
|
|
|
|
|
|
|
private void Load(ContentManager content) {
|
2020-02-24 18:48:14 +00:00
|
|
|
|
Get = content.Load<Texture2D>(contentPath);
|
2020-02-20 21:36:54 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-28 00:13:34 +00:00
|
|
|
|
public static class Textures {
|
2020-02-19 16:19:23 +00:00
|
|
|
|
|
2020-02-20 21:36:54 +00:00
|
|
|
|
public static SpriteFont DebugFont;
|
2020-02-26 22:43:31 +00:00
|
|
|
|
public static SpriteFont BannerFont;
|
2020-02-20 21:36:54 +00:00
|
|
|
|
|
|
|
|
|
public static TextureRef Player = new TextureRef("sprites/ccg/ninja_female");
|
2020-02-28 22:08:34 +00:00
|
|
|
|
public static TextureRef Executioner = new TextureRef("sprites/ccg/executioner_female");
|
2020-02-27 21:26:22 +00:00
|
|
|
|
public static TextureRef Heart = new TextureRef("sprites/semicolin/heart");
|
2020-02-19 16:19:23 +00:00
|
|
|
|
|
2020-02-19 20:00:29 +00:00
|
|
|
|
// Backgrounds are indexed by draw order; the first element should be drawn furthest back.
|
2020-02-20 21:36:54 +00:00
|
|
|
|
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"),
|
|
|
|
|
};
|
2020-02-19 16:19:23 +00:00
|
|
|
|
|
2020-02-20 21:36:54 +00:00
|
|
|
|
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");
|
2020-02-19 16:19:23 +00:00
|
|
|
|
|
|
|
|
|
public static void Load(ContentManager content) {
|
2020-02-26 22:43:31 +00:00
|
|
|
|
DebugFont = content.Load<SpriteFont>("fonts/debug");
|
|
|
|
|
BannerFont = content.Load<SpriteFont>("fonts/banner");
|
2020-02-20 21:36:54 +00:00
|
|
|
|
TextureRef.LoadAll(content);
|
2020-02-19 16:19:23 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|