public void LoadTexture(string texture) { DataLoader.AddTexture(texture); Texture = DataLoader.GetTexture(texture); Width = Texture.Width; Height = Texture.Height; }
public Charachter(string name, int affinity, int malice, string sprite) { Name = name; Affinity = affinity; Malice = malice; CurrentSprite = DataLoader.AddTexture(sprite); }
public Animation(string name, string[] textures, int frameRate) { this.name = name; this.textures = textures; this.FrameRate = frameRate; foreach (string texture in textures) { DataLoader.AddTexture(texture); Console.WriteLine($"[ *C ] <-- {texture} : {name}"); Frames.Add(DataLoader.GetTexture(texture)); } }
public void LoadAllFrames() { if (_framesLoaded) { return; } foreach (KeyValuePair <string, string[]> e in _frames) { string[] f = e.Value; for (int i = 0; i < f.Length; i++) { DataLoader.AddTexture(f[i]); } } _framesLoaded = true; }