public Jump(Player player) : base(player) { CanJump = true; tex = new AnimatedTexture(); tex.Loopable = false; tex.Add(new Texture("./Data/img/player/jump/jump1.png"), 0.5); tex.Add(new Texture("./Data/img/player/jump/jump2.png"), 0.05); }
public Dead(Player player) : base(player) { this.player = player; tex = new AnimatedTexture(); for (int i = 1; i <= 7; i++) { tex.Add(new Texture("./Data/img/player/death/death" + i + ".png"), 0.04); } tex.Loopable = false; }
public DoubleJump(Player player) : base(player) { CanJump = false; tex = new AnimatedTexture(); tex.Loopable = false; for (int i = 1; i <= 8; i++) { tex.Add(new Texture("./Data/img/player/doublejump/doublejump" + i.ToString() + ".png"), 0.05); } }
public HUDAnimatedImage(int duration, OGLTexture[] textures, int w, int h) : base() { atexture.animation_speed = duration; foreach (OGLTexture ogt in textures) { atexture.Add(0, ogt); } width = w; height = h; }
public Walking(Player player) : base(player) { idle = new AnimatedTexture(); for (int i = 1; i < 20; i++) { idle.Add(new Texture("./Data/img/player/idle/player" + i.ToString() + ".png"), 0.03); } run = new AnimatedTexture(); for (int i = 1; i < 7; i++) { run.Add(new Texture("./Data/img/player/run/player_run" + i.ToString() + ".png"), 0.03); } }
public AnimatedTexture GetAnimatedTexture() { var decoder = new MG.GIF.Decoder(Request.downloadHandler.data); var img = decoder.NextImage(); var anim = new AnimatedTexture(URL); while (img != null) { anim.Add(img.CreateTexture(), img.Delay / 1000.0f); img = decoder.NextImage(); } return(anim); }
public Dash(Player player, Vec2 dir) : base(player) { this.dir = dir; speed = player.Speed * accFactor; down = new AnimatedTexture(); for (int i = 1; i <= 11; i++) { down.Add(new Texture("./Data/img/player/downdash/dash" + i + ".png"), 0.04); } side = new AnimatedTexture(); for (int i = 1; i < 7; i++) { side.Add(new Texture("./Data/img/player/run/player_run" + i.ToString() + ".png"), 0.03); } }
public AnimatedTexture GetAnimatedTexture() { var images = GIF.Decoder.Parse(Request.downloadHandler.data); var numFrames = images.NumFrames; if (numFrames == 0) { return(null); } var anim = new AnimatedTexture(URL, numFrames); for (int i = 0; i < numFrames; i++) { var frame = images.GetFrame(i); anim.Add(i, frame.CreateTexture(), frame.Delay / 1000.0f); } return(anim); }
public override AnimatedTexture GetTexture() { AnimatedTexture atexture = new AnimatedTexture(); atexture.animation_speed = 5; //WALK LEFT atexture.Add(0, Textures.mario_big_sheet.GetTextureWrapper(2, 0)); atexture.Add(0, Textures.mario_big_sheet.GetTextureWrapper(3, 0)); atexture.Add(0, Textures.mario_big_sheet.GetTextureWrapper(4, 0)); //WALK RIGHT atexture.Add(1, Textures.mario_big_sheet.GetTextureWrapper(2, 1)); atexture.Add(1, Textures.mario_big_sheet.GetTextureWrapper(3, 1)); atexture.Add(1, Textures.mario_big_sheet.GetTextureWrapper(4, 1)); //STAND atexture.Add(2, Textures.mario_big_sheet.GetTextureWrapper(5, 0)); atexture.Add(2, Textures.mario_big_sheet.GetTextureWrapper(5, 1)); //JUMP atexture.Add(2, Textures.mario_big_sheet.GetTextureWrapper(0, 0)); atexture.Add(2, Textures.mario_big_sheet.GetTextureWrapper(0, 1)); //PIPE atexture.Add(3, Textures.mario_big_sheet.GetTextureWrapper(13, 0)); atexture.Add(3, Textures.mario_big_sheet.GetTextureWrapper(13, 1)); // SWIM LEFT atexture.Add(4, Textures.mario_big_sheet.GetTextureWrapper(8, 0)); atexture.Add(4, Textures.mario_big_sheet.GetTextureWrapper(9, 0)); atexture.Add(4, Textures.mario_big_sheet.GetTextureWrapper(10, 0)); atexture.Add(4, Textures.mario_big_sheet.GetTextureWrapper(11, 0)); // SWIM RIGHT atexture.Add(5, Textures.mario_big_sheet.GetTextureWrapper(8, 1)); atexture.Add(5, Textures.mario_big_sheet.GetTextureWrapper(9, 1)); atexture.Add(5, Textures.mario_big_sheet.GetTextureWrapper(10, 1)); atexture.Add(5, Textures.mario_big_sheet.GetTextureWrapper(11, 1)); // CROUCHING atexture.Add(6, Textures.mario_big_sheet.GetTextureWrapper(14, 0)); atexture.Add(6, Textures.mario_big_sheet.GetTextureWrapper(14, 1)); return(atexture); }
public SwordHit(Player player) : base(player) { tex = new AnimatedTexture(); tex.Add(new Texture("./Data/img/player/sword/sword1.png"), 0.04); tex.Add(new Texture("./Data/img/player/sword/sword2.png"), 0.04); }
public Falling(Player player) : base(player) { tex = new AnimatedTexture(); for (int i = 1; i <= 5; i++) tex.Add(new Texture("./Data/img/player/fall/fall" + i + ".png"), 0.05); }