1
0
Fork 0

feat: soft drop

This commit is contained in:
Henrik Hautakoski 2025-09-15 06:59:54 +02:00
parent f7df74aeaa
commit 8f11a99e08

View file

@ -50,6 +50,12 @@ func LockShape() {
}
func Update(delta float32) {
if rl.IsKeyPressed(rl.KeyDown) {
dropTimer.SetInterval(0.05)
} else if rl.IsKeyReleased(rl.KeyDown) {
dropTimer.SetInterval(0.3)
}
if rl.IsKeyPressed(rl.KeyUp) {
rotated := shape.RotateCW()
if !game.CheckShapeCollision(shape_pos, &rotated, &grid) {