diff --git a/examples/platformer/main.go b/examples/platformer/main.go index 2c903e647..8e8989b5a 100644 --- a/examples/platformer/main.go +++ b/examples/platformer/main.go @@ -113,6 +113,7 @@ func (c *char) draw(screen *ebiten.Image) { } op := &ebiten.DrawImageOptions{} + // Use a smaller scale than 1 to shrink the image. op.GeoM.Scale(0.5, 0.5) op.GeoM.Translate(float64(c.x)/unit, float64(c.y)/unit) screen.DrawImage(s, op) @@ -141,15 +142,15 @@ func (g *Game) Update() error { } func (g *Game) Draw(screen *ebiten.Image) { - // Draws Background Image + // Draws Background Image. op := &ebiten.DrawImageOptions{} op.GeoM.Scale(0.5, 0.5) screen.DrawImage(backgroundImage, op) - // Draws the Gopher + // Draws the Gopher. g.gopher.draw(screen) - // Show the message + // Show the message. msg := fmt.Sprintf("TPS: %0.2f\nPress the space key to jump.", ebiten.ActualTPS()) ebitenutil.DebugPrint(screen, msg) }