public void Boss_UpdatePosition_Hard_Success() { Boss_Hard boss = new Boss_Hard(3000, 80, 12, 2000, 2000); boss.UpdatePosition(); Assert.IsTrue(boss.state == State.Start); Assert.IsTrue(boss.hitbox.X == boss.X); Assert.IsTrue(boss.hitbox.Y == boss.Y); Assert.IsFalse(boss.fired_slanted_targeted_shot); boss = new Boss_Hard(100, 80, 12, 2000, 2000);; boss.UpdatePosition(); Assert.IsTrue(boss.X > 100); Assert.IsTrue(boss.Y > 80); Assert.IsTrue(boss.dir == Direction.Left); boss.x_axis = -1000; boss.UpdatePosition(); Assert.IsTrue(boss.dir == Direction.Right); boss.x_axis = 0; boss.UpdatePosition(); Assert.IsTrue(boss.dir == Direction.Left); boss.cooldown = 1; boss.UpdatePosition(); Assert.IsTrue(boss.action); Assert.IsTrue(boss.fired_slanted_targeted_shot); Assert.IsTrue(boss.cooldown == 50); }
public void Boss_UpdatePosition_Hard_IsEntering_Skip() { Boss_Hard boss = new Boss_Hard(3000, 80, 12, 2000, 2000); boss.UpdatePosition(); Assert.IsTrue(boss.X == 2996); Assert.IsTrue(boss.Y == 80); }
public void Boss_Hit_Hard_Success() { Boss_Hard boss = new Boss_Hard(900, 80, 12, 2000, 2000); Assert.IsFalse(boss.Hit()); boss.X = 100; boss.startup = false; Assert.IsFalse(boss.Hit()); Assert.IsTrue(boss.health == 11); boss.health = 1; Assert.IsTrue(boss.Hit()); Assert.IsFalse(boss.alive); }