Small adjustments

This commit is contained in:
Carlos Ballesteros Velasco
2017-04-22 05:00:28 +02:00
parent ec309a0071
commit b18cbb4548

View File

@@ -35,20 +35,34 @@ fun Board.Cell.setAnimate(type: Chip) {
fun Board.Cell.highlight(highlight: Boolean) {
view["highlight"].play(if (highlight) "highlight" else "none")
if (highlight) async {
view.tween(
(view["chip"]!!::scale..0.1..1.2).easeOutElastic(),
//vview::rotationDegrees..0.0..360.0,
time = 600
)
if (highlight) {
async {
while (true) {
val hl = view["highlight"]!!
while (true) {
hl.tween((hl::alpha..0.7).easeInOutQuad(), time = 300)
hl.tween((hl::alpha..1.0).easeInOutQuad(), time = 200)
}
}
}
async {
val ch = view["chip"]!!
view.tween((ch::scale..0.4).easeOutQuad(), time = 100)
view.tween((ch::scale..1.2).easeOutElastic(), time = 300)
while (true) {
view.tween((ch::scale..1.0).easeOutQuad(), time = 300)
view.tween((ch::scale..1.2).easeOutElastic(), time = 300)
}
}
}
}
fun Board.Cell.lowlight(lowlight: Boolean) {
async {
view.tween(
view!!::scale..1.0..0.8,
view!!::alpha..0.5,
view!!::scale..1.0..0.7,
view!!::alpha..0.3,
time = 300, easing = Easings.EASE_OUT_QUAD
)
}