Refine player movement and physics constants for improved 20 TPS gameplay, add reusable config values, enhance button loading states, and prevent duplicate game starts. Update cache-busting version for client assets.
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m3s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m3s
This commit is contained in:
@@ -362,11 +362,12 @@ func (g *Game) DrawGame(screen *ebiten.Image) {
|
||||
sprite := "player" // Default: am Boden
|
||||
|
||||
// Nur Jump-Animation wenn wirklich in der Luft
|
||||
// (nicht auf Boden, nicht auf Platform mit VY ~= 0)
|
||||
isInAir := !onGround && (vy < -1.0 || vy > 1.0)
|
||||
// Bei 20 TPS größerer Threshold (3.0 statt 1.0)
|
||||
// OnGround oder sehr kleine VY = am Boden/Plattform
|
||||
isInAir := !onGround && (vy < -3.0 || vy > 3.0)
|
||||
|
||||
if isInAir {
|
||||
if vy < -2.0 {
|
||||
if vy < -5.0 {
|
||||
// Springt nach oben
|
||||
sprite = "jump0"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user