Beispiel #1
0
        public CreepRenderer(CreepTextureEntry Entry)
        {
            Sprites = new Dictionary<CreepUnit, DirectionnalSprite>();
            Textures = new DirectionnalSurfaces();

            string SpritePath = "../../../../assets/Sprite/";

            foreach(string str in Entry.FrameUp)
            {
                Textures.Up.Add(new Surface(SpritePath + str));
            }

            foreach (string str in Entry.FrameDown)
            {
                Textures.Down.Add(new Surface(SpritePath + str));
            }

            foreach (string str in Entry.FrameLeft)
            {
                Textures.Left.Add(new Surface(SpritePath + str));
            }

            foreach (string str in Entry.FrameRight)
            {
                Textures.Right.Add(new Surface(SpritePath + str));
            }
        }
Beispiel #2
0
        public CreepTextureEntry GetEntry(String GfxName)
        {
            CreepTextureEntry Entry = new CreepTextureEntry();

            foreach (CreepTextureEntry e in Index)
            {
                if (e.Name == GfxName)
                {
                    return e;
                }
            }

            return Entry;
        }