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)); } }
public CreepRenderer() { Sprites = new Dictionary<CreepUnit, DirectionnalSprite>(); Textures = new DirectionnalSurfaces(); Textures.Up.Add(new Surface("../../../../assets/Sprite/creep1/Up0.png")); Textures.Up.Add(new Surface("../../../../assets/Sprite/creep1/Up1.png")); Textures.Up.Add(new Surface("../../../../assets/Sprite/creep1/Up2.png")); Textures.Up.Add(new Surface("../../../../assets/Sprite/creep1/Up3.png")); Textures.Down.Add(new Surface("../../../../assets/Sprite/creep1/Down0.png")); Textures.Down.Add(new Surface("../../../../assets/Sprite/creep1/Down1.png")); Textures.Down.Add(new Surface("../../../../assets/Sprite/creep1/Down2.png")); Textures.Down.Add(new Surface("../../../../assets/Sprite/creep1/Down3.png")); Textures.Left.Add(new Surface("../../../../assets/Sprite/creep1/Left0.png")); Textures.Left.Add(new Surface("../../../../assets/Sprite/creep1/Left1.png")); Textures.Left.Add(new Surface("../../../../assets/Sprite/creep1/Left2.png")); Textures.Left.Add(new Surface("../../../../assets/Sprite/creep1/Left3.png")); Textures.Right.Add(new Surface("../../../../assets/Sprite/creep1/Right0.png")); Textures.Right.Add(new Surface("../../../../assets/Sprite/creep1/Right1.png")); Textures.Right.Add(new Surface("../../../../assets/Sprite/creep1/Right2.png")); Textures.Right.Add(new Surface("../../../../assets/Sprite/creep1/Right3.png")); }
public DirectionnalSprite(DirectionnalSurfaces Textures) : base() { SurfaceUp = Textures.Up; SurfaceDown = Textures.Down; SurfaceLeft = Textures.Left; SurfaceRight = Textures.Right; Direction = Direction.Unset; AllowDrag = false; Surface = new Surface(1, 1); FramePause = 2; }