Exemple #1
0
 private void DrawingLoop(SKCanvas canvas)
 {
     canvas.Clear(SKColors.DarkBlue);
     canvas.DrawBitmap(
         backgroundBitmap,
         new SKRect(
             0,
             0,
             Settings.General.xAxisLength,
             Settings.General.yAxisLength
             )
         );
     player.Draw(canvas);
     enemyManager.DrawEnemies(canvas);
     projectileManager.DrawProjectiles(canvas);
     GraphicalUserInterface.DrawScore(canvas, enemyManager.score);
     GraphicalUserInterface.DrawFPS(canvas, (int)loopTimer.GetFPS());
 }
Exemple #2
0
 public void Draw(SKCanvas canvas)
 {
     if (!exploded)
     {
         canvas.DrawBitmap(ChooseBitmap(), GetRect());
         GraphicalUserInterface.DrawHealthbar(
             canvas,
             pos.X,
             pos.Y,
             (float)(health / maxHealth)
             );
         animatorJetPack.Draw(canvas, GetRectJetPackFlame());
     }
     else
     {
         animatorExpl.Draw(canvas, GetRectExpl());
     }
 }