diff --git a/examples/M-modules/quick/sokoban/qml/ext/RotationAnimationExt.qml b/examples/M-modules/quick/sokoban/qml/ext/RotationAnimationExt.qml new file mode 100644 index 0000000..717e5db --- /dev/null +++ b/examples/M-modules/quick/sokoban/qml/ext/RotationAnimationExt.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 +import EQL5 1.0 + +RotationAnimation { + onRunningChanged: { Lisp.call("qsoko:animation-change", running) } +} + diff --git a/examples/M-modules/quick/sokoban/qml/items/box2.qml b/examples/M-modules/quick/sokoban/qml/items/box2.qml index eb1e3d5..727b677 100644 --- a/examples/M-modules/quick/sokoban/qml/items/box2.qml +++ b/examples/M-modules/quick/sokoban/qml/items/box2.qml @@ -27,8 +27,8 @@ Image { RotationAnimation { target: box2 property: "rotation" - from: -30; to: 30 - duration: 300 + from: 0; to: 30 + duration: 150 } RotationAnimation { @@ -37,5 +37,12 @@ Image { from: 30; to: -30 duration: 300 } + + RotationAnimation { + target: box2 + property: "rotation" + from: -30; to: 0 + duration: 150 + } } } diff --git a/examples/M-modules/quick/sokoban/qml/items/player.qml b/examples/M-modules/quick/sokoban/qml/items/player.qml index 5a3b2fb..bb34ce7 100644 --- a/examples/M-modules/quick/sokoban/qml/items/player.qml +++ b/examples/M-modules/quick/sokoban/qml/items/player.qml @@ -20,7 +20,7 @@ Image { // final animation - RotationAnimation { + RotationAnimationExt { objectName: "rotate_player" target: player property: "rotation" diff --git a/examples/M-modules/quick/sokoban/sokoban.lisp b/examples/M-modules/quick/sokoban/sokoban.lisp index b16f777..e2a854a 100644 --- a/examples/M-modules/quick/sokoban/sokoban.lisp +++ b/examples/M-modules/quick/sokoban/sokoban.lisp @@ -246,9 +246,8 @@ t) (defun final-animation () - (qml-set "rotate_player" "running" t) - (queued (qml-set-all "wiggle_box" "running" t) - (qml-set-all "object2" "rotation" 0))) + (queued (qml-set "rotate_player" "running" t) + (qml-set-all "wiggle_box" "running" t))) (defun run () (x:do-with *quick-view*