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
|
internal var lightningFactor: Float = 0.33F
|
||||||
}
|
}
|
||||||
private fun execAction() {
|
private fun execAction() { action?.invoke(this) }
|
||||||
action?.let {
|
|
||||||
this@ClickButton.it()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private var wasWithinBounds: Boolean = false
|
private var wasWithinBounds: Boolean = false
|
||||||
var toggled: Boolean = false; private set(value) {
|
var toggled: Boolean = false; private set(value) {
|
||||||
if (value) lightUp() else if (field) lightDown()
|
if (value) lightUp() else if (field) lightDown()
|
||||||
|
|
Loading…
Reference in New Issue