Ejemplo n.º 1
0
 public void LoadTexture(string texture)
 {
     DataLoader.AddTexture(texture);
     Texture = DataLoader.GetTexture(texture);
     Width   = Texture.Width;
     Height  = Texture.Height;
 }
Ejemplo n.º 2
0
 public Charachter(string name, int affinity, int malice, string sprite)
 {
     Name          = name;
     Affinity      = affinity;
     Malice        = malice;
     CurrentSprite = DataLoader.AddTexture(sprite);
 }
Ejemplo n.º 3
0
        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));
            }
        }
Ejemplo n.º 4
0
        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;
        }