/// <summary> /// Static initializer for loading all sprites / textures. /// </summary> /// <param name="content">MonoGame ContentManager.</param> internal static void LoadSprites(ContentManager content) { if (Player == null) { Player = new PlayerSprites(content); } if (Floor == null) { Floor = new FloorSprites(content); } if (Wall == null) { Wall = new WallSprites(content); } if (Monster == null) { Monster = new MonsterSprites(content); } if (Fringe == null) { Fringe = new FringeSprites(content); } if (UI == null) { UI = new UISprites(content); } }
public void SetNumber(int number) { if (image == null) { image = GetComponent <Image>(); } image.sprite = (IsLarge ? UISprites.GetLargeNumberSprite(number) : UISprites.GetNumberSprite(number)); }
private void Awake() { instance = this; }