Fixes replayer speed

hh
Laurent 5 years ago
parent cf6027e530
commit fc69ebce13
  1. 12
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayerModel.kt

@ -5,18 +5,18 @@ import androidx.lifecycle.ViewModel
class ReplayerModel : ViewModel() { class ReplayerModel : ViewModel() {
enum class Multiplier(val value: Double) { enum class Multiplier(val value: Double) {
SLOW(0.75), SLOW(1.0),
BASIC(1.0), BASIC(1.5),
FAST(1.5) FAST(2.0)
} }
var configuration: ReplayerConfiguration? = null var configuration: ReplayerConfiguration? = null
var isPlaying: Boolean = false var isPlaying: Boolean = false
private val actionSpeed = 1000L private val actionSpeed = 1500L
var speedMultiplier: Multiplier = Multiplier.BASIC var speedMultiplier: Multiplier = Multiplier.SLOW
private set private set
fun previousStep() { fun previousStep() {
@ -28,7 +28,7 @@ class ReplayerModel : ViewModel() {
} }
val actionDelay: Long val actionDelay: Long
get() { return (speedMultiplier.value * actionSpeed).toLong() } get() { return (this.actionSpeed / this.speedMultiplier.value).toLong() }
/*** /***
* Rotate in cycles the speed * Rotate in cycles the speed

Loading…
Cancel
Save