mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-18 10:25:19 +01:00
fix: ensure line clear callbacks are properly connected in GameView.setGameBoard()
This commit is contained in:
parent
b068de76f5
commit
5016b6a2f3
4 changed files with 67 additions and 12 deletions
|
@ -104,9 +104,18 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
gameView.onLineClear = { lineCount ->
|
||||
android.util.Log.d("MainActivity", "Received line clear callback: $lineCount lines")
|
||||
// Use enhanced haptic feedback for line clears
|
||||
if (isSoundEnabled) {
|
||||
gameHaptics.vibrateForLineClear(lineCount)
|
||||
android.util.Log.d("MainActivity", "Sound is enabled, triggering haptic feedback")
|
||||
try {
|
||||
gameHaptics.vibrateForLineClear(lineCount)
|
||||
android.util.Log.d("MainActivity", "Haptic feedback triggered successfully")
|
||||
} catch (e: Exception) {
|
||||
android.util.Log.e("MainActivity", "Error triggering haptic feedback", e)
|
||||
}
|
||||
} else {
|
||||
android.util.Log.d("MainActivity", "Sound is disabled, skipping haptic feedback")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue