From bf55f19e9e6d43be3c5f3f654ccc90f557250396 Mon Sep 17 00:00:00 2001 From: Florian Rival Date: Tue, 5 Nov 2024 16:51:45 +0100 Subject: [PATCH] Avoid to use a timer --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 106 +++++++----------- 1 file changed, 38 insertions(+), 68 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 9e198936a..aef29f9fb 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -4776,20 +4776,25 @@ "conditions": [ { "type": { - "value": "CompareObjectTimer" + "inverted": true, + "value": "Tween::Exists" }, "parameters": [ - "Object", - "\"Animate\"", - ">=", - "0" + "Icon", + "Tween", + "\"Rotate\"" ] }, { "type": { - "value": "BuiltinCommonInstructions::Once" + "inverted": true, + "value": "Tween::Exists" }, - "parameters": [] + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] } ], "actions": [ @@ -4814,20 +4819,13 @@ "conditions": [ { "type": { - "value": "CompareObjectTimer" + "value": "Tween::HasFinished" }, "parameters": [ - "Object", - "\"Animate\"", - ">=", - "2" + "Icon", + "Tween", + "\"RotateBack\"" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], "actions": [ @@ -4839,11 +4837,21 @@ "Icon", "Tween", "\"Rotate\"", - "-8", + "8", "\"easeInOutQuad\"", "2", "" ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] } ] }, @@ -4852,32 +4860,16 @@ "conditions": [ { "type": { - "value": "CompareObjectTimer" + "value": "Tween::HasFinished" }, "parameters": [ - "Object", - "\"Animate\"", - ">=", - "4" + "Icon", + "Tween", + "\"Rotate\"" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"Animate\"" - ] - }, { "type": { "value": "Tween::TweenBehavior::AddObjectAngleTween2" @@ -4885,43 +4877,21 @@ "parameters": [ "Icon", "Tween", - "\"Rotate\"", - "8", + "\"RotateBack\"", + "-8", "\"easeInOutQuad\"", "2", "" ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "ResetObjectTimer" + "value": "Tween::RemoveTween" }, "parameters": [ - "Object", - "\"Animate\"" + "Icon", + "Tween", + "\"Rotate\"" ] } ]