AIAgentLayer: reset hands animation during out animation
authorTaehyub Kim <taehyub.kim@samsung.com>
Fri, 17 Jun 2022 06:33:22 +0000 (15:33 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Mon, 4 Jul 2022 07:13:17 +0000 (16:13 +0900)
- reset hands animation when out animation and  hands animation are enabled
- update move alpha function for smooth animation

test/AIAgentLayer/AIAgentLayer.cs
test/AIAgentLayer/res/mini_a.riv

index eb7da68..376a938 100644 (file)
@@ -146,8 +146,8 @@ namespace AIAgentLayer
             }
 
             moveAnimation = new Animation(800);
-            var c1 = new Vector2(0.86f, 0.0f);
-            var c2 = new Vector2(0.07f, 1.0f);
+            var c1 = new Vector2(0.5f, 0.0f);
+            var c2 = new Vector2(0.5f, 1.0f);
 
             alphaFunction = new AlphaFunction(c1, c2);
             moveAnimation.DefaultAlphaFunction = alphaFunction;
@@ -189,7 +189,7 @@ namespace AIAgentLayer
             //Create RiveAnimation
             rav = new Tizen.NUI.Extension.RiveAnimationView(Tizen.Applications.Application.Current.DirectoryInfo.Resource + "mini_a.riv")
             {
-                Size = new Size(300, 300),
+                Size = new Size(250, 250),
                 Position = new Position( 750, 300)
             };
 
@@ -215,6 +215,14 @@ namespace AIAgentLayer
                 rav.SetAnimationElapsedTime("reset", -1.0f);
                 rav.SetAnimationElapsedTime("eye 360", -1.0f);
                 rav.SetAnimationElapsedTime("out", 0.0f);
+
+                rav.SetAnimationElapsedTime("thinking", 0.0f);
+                rav.SetAnimationElapsedTime("listen", 0.0f);
+                rav.SetAnimationElapsedTime("ok", 0.0f);
+                rav.EnableAnimation("thinking", false);
+                rav.EnableAnimation("listen", false);
+                rav.EnableAnimation("ok", false);
+
                 rav.EnableAnimation("out", false);
                 rav.EnableAnimation("in", true);
                 inAnimation.Play();
index 1d7d73a..54eba1d 100644 (file)
Binary files a/test/AIAgentLayer/res/mini_a.riv and b/test/AIAgentLayer/res/mini_a.riv differ