Пример #1
0
        public override void Draw()
        {
            Canvas.Clear(Color.Black);

            DrawStack.Draw(Canvas);

            DrawableScore.Draw(Canvas);

            for (int i = 0; i < Player.EntityData.Health; i++)
            {
                Canvas.DrawImage(Player.HealthTexture, new Vec2(Window.Size.X - (((Player.HealthTexture.Size.X * 0.5 + 15) * i) + 15 + Player.HealthTexture.Size.X), 25), scale: new Vec2(0.5));
            }

            Canvas.Present();
        }
Пример #2
0
        public override void Draw()
        {
            Canvas.Clear(Color.DarkGreen);

            DrawStack.Draw(Canvas);

            Canvas.DrawText(LoadedFont, $"Score: {Game.Score}", new Vec2(15, 15), color: Color.Green);

            for (int i = 0; i < Player.EntityData.Health; i++)
            {
                Canvas.DrawImage(Player.HealthTexture, new Vec2(Window.Size.X - (((Player.HealthTexture.Size.X * 0.5 + 15) * i) + 15 + Player.HealthTexture.Size.X), 25), scale: new Vec2(0.5));
            }

            Canvas.Present();
        }
Пример #3
0
 public override void Draw()
 {
     DrawStack.Draw(Canvas);
 }