From 759688bb3878ad9a70e890053dd00c04530a0410 Mon Sep 17 00:00:00 2001 From: Serkan Aksit <5222368+sekodev@users.noreply.github.com> Date: Sun, 6 Nov 2022 02:42:01 +0300 Subject: [PATCH] Add effects - tossLeft & tossRight Those changes add new effect 'toss', similar to swipes in Tinder(application) or Reigns(game) --- composer.lua | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/composer.lua b/composer.lua index 6a1c1a1..472785c 100644 --- a/composer.lua +++ b/composer.lua @@ -549,7 +549,43 @@ local effectList = { alphaEnd = 1.0 }, concurrent = true - } + }, + + ["tossLeft"] = + { + ["from"] = + { + xStart = 0, + xEnd = -displayW * 3, + rotationStart = 0, + rotationEnd = -30, + }, + + ["to"] = + { + xStart = 0, + xEnd = 0, + }, + concurrent = true + }, + + ["tossRight"] = + { + ["from"] = + { + xStart = 0, + xEnd = displayW * 3, + rotationStart = 0, + rotationEnd = 30, + }, + + ["to"] = + { + xStart = 0, + xEnd = 0, + }, + concurrent = true + }, } lib.effectList = effectList @@ -1632,4 +1668,4 @@ lib._sceneFileExists = function( fileName ) return fileExists end -return lib \ No newline at end of file +return lib