Shorten the execAction method
This commit is contained in:
parent
00a12bb828
commit
d8231aadfb
|
@ -23,11 +23,7 @@ class ClickButton(
|
|||
}
|
||||
internal var lightningFactor: Float = 0.33F
|
||||
}
|
||||
private fun execAction() {
|
||||
action?.let {
|
||||
this@ClickButton.it()
|
||||
}
|
||||
}
|
||||
private fun execAction() { action?.invoke(this) }
|
||||
private var wasWithinBounds: Boolean = false
|
||||
var toggled: Boolean = false; private set(value) {
|
||||
if (value) lightUp() else if (field) lightDown()
|
||||
|
|
Loading…
Reference in New Issue