public Bradley_rocket(float x, float y, int delay, bool sound) : base(x, y) { spritemap.Add(Animation.up, "0-2", 1); spritemap2.Add(Animation.down, "0-2", 1); spritemap.CenterOrigin(); spritemap2.CenterOrigin(); Layer = +600; this.delay = delay; scene.Add(this); this.sound = sound; }
public BiggestTonk(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0", 4); spritemap.Add(Animation.Shoot, "0-16", 4).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); cooldown = scene.random.Next(60 * 2, 60 * 3); scene.Add(this); SetHitbox(187, 80, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public Mortar(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0", 4); spritemap.Add(Animation.Shoot, "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13", 4).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); cooldown = scene.random.Next(60 * 1, 60 * 2); scene.Add(this); SetHitbox(40, 42, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public Minigun(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0, 1, 2, 3", 4); spritemap.Add(Animation.Shoot, "4-20", 4).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); scene.Add(this); this.cooldown = scene.random.Next(60 * 4, 60 * 6); SetHitbox(128, 63, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public FatTonk(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0, 1", 4); spritemap.Add(Animation.Shoot, "2-17", 4).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); cooldown = scene.random.Next(60 * 1, 60 * 2); scene.Add(this); SetHitbox(130, 62, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public Soldier(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, scene.GetAnimationString(0, 0), 5).NoRepeat(); spritemap.Add(Animation.Throw, scene.GetAnimationString(0, 11), 4).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); runtime = (int)spritemap.Anim(Animation.Idle).TotalDuration *scene.random.Next(3, 4); AddGraphic(spritemap); scene.Add(this); SetHitbox(43, 42, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public Projectile_rocket(float x, float y, float ex, float ey) : base(x, y) { spritemap.Add(Animation.Fly, "0-1", 3); start = new Vector2(x, y); end = new Vector2(ex, ey); //spritemap.Angle = (float)((Math.Atan2(start.X - end.X, start.Y - end.Y)) * (180 / Math.PI)) + 90; spritemap.CenterOrigin(); spritemap.Angle = (float)((Math.Atan2(start.X - end.X, start.Y - end.Y)) * (180 / Math.PI)) + 90; AddGraphic(spritemap); spritemap.Play(Animation.Fly); scene.Add(this); sound.Play(); Layer = -600; }
public Enemy_Shield(float x, float y) : base(x, y) { Layer = -500; this.MaxHP = scene.stage.MaxHP / 4; this.CurrentHP = this.MaxHP; SetHitbox(33, 40, ColliderTags.EnemyUnit); Hitbox.SetPosition(28, 27); spritemap.Add(Animation.Death1, scene.GetAnimationString(0, 21), 4).NoRepeat(); spritemap.Add(Animation.Death2, "22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 31", 4).NoRepeat(); spritemap.Add(Animation.Death3, scene.GetAnimationString(33, 41), 4).NoRepeat(); spritemap.Add(Animation.Death4, scene.GetAnimationString(42, 52), 4).NoRepeat(); spritemap.Add(Animation.Death5, scene.GetAnimationString(53, 67), 4).NoRepeat(); spritemap.Add(Animation.Death6, scene.GetAnimationString(68, 80), 4).NoRepeat(); spritemap.Add(Animation.Death7, scene.GetAnimationString(81, 95), 4).NoRepeat(); spritemap.Add(Animation.WeaponOut, "96-99", 4).NoRepeat(); spritemap.Add(Animation.WeaponBack, "99-96", 4).NoRepeat(); spritemap.Add(Animation.Idle, "100-105", 8); spritemap.Add(Animation.Run, "106-117", 4); spritemap.Add(Animation.Shoot, "118-123", 4).NoRepeat(); spritemap.Play(Animation.Run); AddGraphic(spritemap); scene.Add(this); scene.enemyList.Add(this); runtime = (int)spritemap.Anim(Animation.Run).TotalDuration *scene.random.Next(3, 12); }
public override void Update() { if (this.Timer >= this.delay) { if (this.Timer == this.delay) { spritemap.Play(Animation.rotate); AddGraphic(spritemap); //Throw.Volume = Sound.GlobalVolume * 0.2f; Throw.Play(); } if (this.Timer <= this.delay + 60) { //Y -= ((start.Y - hight) /1830)*counter; spritemap.Angle += (68f / 1830) * counter; Y -= ((start.Y - height) / 1830) * counter; counter--; } else { spritemap.Angle += (68f / 1830) * counter; Y += ((destination.Y - height) / 1830) * counter; counter++;; } X -= (start.X - destination.X) / 120; } if (X <= destination.X) { scene.Add(new Explosions(X, Y, Explosions.ExplosionType.small, 0, false)); RemoveSelf(); } base.Update(); }
public Enemy_Cokka(float x, float y) : base(x, y) { Layer = -500; this.MaxHP = scene.stage.MaxHP * 2; this.CurrentHP = this.MaxHP; SetHitbox(72, 57, ColliderTags.EnemyUnit); Hitbox.SetPosition(12, 20); spritemap.Add(Animation.Shoot, scene.GetAnimationString(0, 16), 4).NoRepeat(); spritemap.Add(Animation.Death, scene.GetAnimationString(17, 25), 4).NoRepeat(); spritemap.Add(Animation.WeaponOut, scene.GetAnimationString(32, 38), 4).NoRepeat(); spritemap.Add(Animation.Run, scene.GetAnimationString(26, 31), 4); spritemap.Play(Animation.Run); AddGraphic(spritemap); scene.Add(this); scene.enemyList.Add(this); runtime = (int)spritemap.Anim(Animation.Run).TotalDuration *scene.random.Next(3, 12); }
public Garbage(float x, float y, string source, bool flipped) : base(x, y) { image = new Image(source); AddGraphic(image); scene.Add(this); image.FlippedX = flipped; SetHitbox(image.TextureRegion.Width, image.TextureRegion.Height, ColliderTags.Garbage); }
public Heli(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0-15", 1); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); cooldown = 40; scene.Add(this); fire = scene.random.Next(60 * 1, 60 * 2); }
public Hover(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0", 4); spritemap.Add(Animation.Shoot, "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33", 2); spritemap.CenterOrigin(); spritemap.Play(Animation.Shoot); AddGraphic(spritemap); scene.Add(this); fire = scene.random.Next(60 * 2, 60 * 3); }
public Rocket(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0", 4); spritemap.Add(Animation.Shoot, "0,1,2,3,4,5,6,7, 8,9,10,8,9,10,8,9,10,8,9,10,8,9,10,8,9,10,8,9,10,8,9,10,8,9,10,8,9,10, 11,12,13,14,15,16,11,12,13,14,15,16,11,12,13,14,15,16,11,12,13,14,15,16, 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34", 4).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); cooldown = scene.random.Next(60 * 4, 60 * 5); scene.Add(this); SetHitbox(124, 110, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public Chest(float x, float y) : base(x, y) { SetHitbox(21, 23, ColliderTags.EnemyUnit); Hitbox.SetPosition(6, 5); this.prize = scene.stage.GetTreasureGold(); spritemap.Add(Animation.Open, "6-9", 4).NoRepeat(); spritemap.Add(Animation.Close, "9-6", 4).NoRepeat(); spritemap.Add(Animation.Idle, "0-5", 4); spritemap.Play(Animation.Idle); AddGraphic(spritemap); scene.Add(this); }
public Sniper(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0", 4); spritemap.Add(Animation.Shoot, "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22", 3).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); cooldown = scene.random.Next(60 * 2, 60 * 3); scene.Add(this); SetHitbox(66, 27, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public Turret(float x, float y) : base(x, y) { spritemap.Add(Animation.Idle, "0, 1", 4); spritemap.Add(Animation.Shoot, "2-17", 4).NoRepeat(); spritemap.CenterOrigin(); spritemap.Play(Animation.Idle); AddGraphic(spritemap); scene.Add(this); cooldown = scene.random.Next(2 * 60, 3 * 60); SetHitbox(170, 80, ColliderTags.Garbage); Hitbox.CenterOrigin(); }
public Enemy_Soldier(float x, float y) : base(x, y) { Layer = -500; this.MaxHP = scene.stage.MaxHP / 4; this.CurrentHP = this.MaxHP; SetHitbox(33, 40, ColliderTags.EnemyUnit); Hitbox.SetPosition(28, 27); spritemap.Add(Animation.Death1, scene.GetAnimationString(0, 21), 4).NoRepeat(); spritemap.Add(Animation.Death2, "22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 31", 4).NoRepeat(); spritemap.Add(Animation.Death3, scene.GetAnimationString(33, 41), 4).NoRepeat(); spritemap.Add(Animation.Death4, scene.GetAnimationString(42, 52), 4).NoRepeat(); spritemap.Add(Animation.Death5, scene.GetAnimationString(53, 67), 4).NoRepeat(); spritemap.Add(Animation.Death6, scene.GetAnimationString(68, 80), 4).NoRepeat(); spritemap.Add(Animation.Death7, scene.GetAnimationString(81, 95), 4).NoRepeat(); spritemap.Add(Animation.Throw, scene.GetAnimationString(115, 129), 4).NoRepeat(); spritemap.Add(Animation.Idle, scene.GetAnimationString(96, 102), 5); spritemap.Add(Animation.Run, scene.GetAnimationString(103, 114), 4); spritemap.Play(Animation.Run); AddGraphic(spritemap); scene.Add(this); scene.enemyList.Add(this); runtime = (int)spritemap.Anim(Animation.Run).TotalDuration *scene.random.Next(3, 12); }
public Projectile_heli_rocket(float x, float y, float ex, float ey, bool heli) : base(x, y) { this.heli = heli; if (heli) { spritemap = new Spritemap <Animation>("Assets/Img/projectile_heli_rocket.png", 55, 16); } else { spritemap = new Spritemap <Animation>("Assets/Img/projectile_hover_rocket.png", 60, 15); } spritemap.Add(Animation.Fly, "1-3", 1); spritemap.Add(Animation.Idle, "0", 4).NoRepeat(); start = new Vector2(x, y); end = new Vector2(ex, ey); //spritemap.Angle = (float)((Math.Atan2(start.X - end.X, start.Y - end.Y)) * (180 / Math.PI)) + 90; spritemap.CenterOrigin(); spritemap.Angle = (float)((Math.Atan2(start.X - end.X, start.Y - end.Y)) * (180 / Math.PI)) - 90; AddGraphic(spritemap); spritemap.Play(Animation.Idle); Layer = -600; scene.Add(this); }
public Enemy_Mummy(float x, float y) : base(x, y) { Layer = -500; this.MaxHP = scene.stage.MaxHP; this.CurrentHP = this.MaxHP; SetHitbox(35, 46, ColliderTags.EnemyUnit); Hitbox.SetPosition(9, 17); spritemap.Add(Animation.Shoot, scene.GetAnimationString(0, 21), 3).NoRepeat(); spritemap.Add(Animation.Death, scene.GetAnimationString(22, 67), 3).NoRepeat(); spritemap.Add(Animation.Run, scene.GetAnimationString(68, 85), 3); spritemap.Play(Animation.Run); AddGraphic(spritemap); scene.Add(this); scene.enemyList.Add(this); runtime = (int)spritemap.Anim(Animation.Run).TotalDuration *scene.random.Next(3, 12); }
public Enemy_high_tonk(float x, float y) : base(x, y) { Layer = -500; this.MaxHP = scene.stage.MaxHP * 4; this.CurrentHP = this.MaxHP; SetHitbox(72, 97, ColliderTags.EnemyUnit); Hitbox.SetPosition(40, 10); spritemap.Add(Animation.Death, "43, 44, 45, 0", 8).NoRepeat(); spritemap.Add(Animation.Run, "1-6", 4); spritemap.Add(Animation.Idle, "7, 8", 4); spritemap.Add(Animation.Shoot, "19-35,9-18", 4).NoRepeat(); //spritemap.Add(Animation.Shoot, "9-35", 4).NoRepeat(); spritemap.Add(Animation.Stop, "36-42", 4).NoRepeat(); spritemap.Play(Animation.Run); AddGraphic(spritemap); scene.Add(this); scene.enemyList.Add(this); runtime = (int)spritemap.Anim(Animation.Run).TotalDuration *scene.random.Next(3, 12); }
public override void Update() { if (this.Timer >= this.delay) { if (this.Timer == this.delay) { spritemap.Play(Animation.rotate); AddGraphic(spritemap); Throw.Play(); } if (!ally) { X += (destination.X - start.X) / 120; } else { X -= (start.X - destination.X) / 120; } if (this.Timer <= this.delay + 60) { //Y -= ((start.Y - hight) /1830)*counter; Y -= ((start.Y - height) / 1830) * counter; counter--; } else { Y += ((destination.Y - height) / 1830) * counter; counter++; } } if ((X >= destination.X && !ally) || (X <= destination.X && ally)) { scene.Add(new Explosions(X, Y, Explosions.ExplosionType.small, 0, false)); RemoveSelf(); } base.Update(); }