Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }