Пример #1
0
        private void RenderPlayerLives()
        {
            float offset = 0;
            int   i      = 1;

            while (i <= MemoryManager.Instance.Player.HP && i <= 10)
            {
                i++;
                SwinGame.FillTriangle(SwinGame.ColorGreen(), 30 + offset, SwinGame.ScreenHeight() - 25, 20 + offset, SwinGame.ScreenHeight() - 5, 40 + offset, SwinGame.ScreenHeight() - 5);
                offset = offset + 22;
            }
        }
        public void TestShapeConstructor()
        {
            Shape s = new Shape(SwinGame.ColorGreen(), 50, 55, 51, 52);

            Assert.AreEqual(SwinGame.ColorGreen(), s.Color);
            Assert.AreEqual(50, s.X);
            Assert.AreEqual(55, s.Y);
            Assert.AreEqual(51, s.Width);
            Assert.AreEqual(52, s.Height);

            s.Color  = SwinGame.ColorRed();
            s.X      = 5;
            s.Y      = 5;
            s.Width  = 5;
            s.Height = 5;

            Assert.AreEqual(SwinGame.ColorRed(), s.Color);
            Assert.AreEqual(5, s.X);
            Assert.AreEqual(5, s.Y);
            Assert.AreEqual(5, s.Width);
            Assert.AreEqual(5, s.Height);
        }