feat: add more debug info
This commit is contained in:
parent
d66a87ee73
commit
fb59445434
|
@ -80,13 +80,27 @@ func (g *Game) drawDebug() {
|
||||||
g.img,
|
g.img,
|
||||||
fmt.Sprintf(
|
fmt.Sprintf(
|
||||||
"FPS: %0.2f"+
|
"FPS: %0.2f"+
|
||||||
"\nBall: x=%v, y=%v, speedX=%v, speedY=%v, radius=%v",
|
"\nBall: x=%v, y=%v, speedX=%v, speedY=%v, radius=%v"+
|
||||||
|
"\nLeft paddle: x=%v, y=%v, speed=%v, width=%v, height=%v, isControlledByPlayer=%v"+
|
||||||
|
"\nRight paddle: x=%v, y=%v, speed=%v, width=%v, height=%v, isControlledByPlayer=%v",
|
||||||
ebiten.ActualFPS(),
|
ebiten.ActualFPS(),
|
||||||
g.ball.x,
|
g.ball.x,
|
||||||
g.ball.y,
|
g.ball.y,
|
||||||
g.ball.speedX,
|
g.ball.speedX,
|
||||||
g.ball.speedY,
|
g.ball.speedY,
|
||||||
g.ball.r,
|
g.ball.r,
|
||||||
|
g.leftPaddle.x,
|
||||||
|
g.leftPaddle.y,
|
||||||
|
g.leftPaddle.speed,
|
||||||
|
g.leftPaddle.width,
|
||||||
|
g.leftPaddle.height,
|
||||||
|
g.leftPaddle.isControlledByPlayer,
|
||||||
|
g.rightPaddle.x,
|
||||||
|
g.rightPaddle.y,
|
||||||
|
g.rightPaddle.speed,
|
||||||
|
g.rightPaddle.width,
|
||||||
|
g.rightPaddle.height,
|
||||||
|
g.rightPaddle.isControlledByPlayer,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user