Example #1
0
 public override void Render()
 {
     SwinGame.FillRectangle(SwinGame.ColorTeal(), X, Y, _width, _height);
     SwinGame.DrawText(_weapon.Name, SwinGame.ColorBlack(), X, Y + _height / 2);
     if (GameMain.DEBUG)
     {
         SwinGame.DrawRectangle(SwinGame.ColorWhite(), CollisionBox.X, CollisionBox.Y, CollisionBox.Height, CollisionBox.Width);
     }
 }
Example #2
0
        public override void Render()
        {
            SwinGame.DrawBitmap(Sprite, X, Y);


            if (GameMain.DEBUG)
            {
                SwinGame.DrawRectangle(SwinGame.ColorWhite(), CollisionBox.X, CollisionBox.Y, CollisionBox.Width, CollisionBox.Height);
            }
        }
        public void TestCase()
        {
            Drawing drawing = new Drawing();

            Assert.AreEqual(SwinGame.ColorWhite(), drawing.Colour);

            Drawing drawing2 = new Drawing(SwinGame.ColorRed());

            Assert.AreEqual(SwinGame.ColorRed(), drawing2.Colour);
        }
Example #4
0
            public void DisplayGame(GameData game)
            {
                SwinGame.ClearScreen(SwinGame.ColorWhite());
                SwinGame.DrawBitmap("background", 0, 0);
                game.ply.drawPlayer();
                game.bl.drawBall(game.ball);
                game.blk.DrawBlocks(game);
                game.itm.drawItem(game);
                SwinGame.DrawText("Score: " + game.ply.player.score.ToString() + " Lives: " + game.ply.player.lives.ToString(), SwinGame.ColorBlack(), 0, 0);

                SwinGame.RefreshScreen(60);
            }
Example #5
0
 public Drawing() : this(SwinGame.ColorWhite())
 {
     // Uses constructor initializer if not parameters entered.
 }