From f0cf78ebd5fc04535307449c6508d04b3058d3a9 Mon Sep 17 00:00:00 2001 From: Z Date: Mon, 24 Jun 2024 17:58:45 +0800 Subject: [PATCH] fixed ease and trans --- Example/Tween/EGTween.tscn | 11 +++-------- Example/Tween/Script/TweenTest.cs | 3 +++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Example/Tween/EGTween.tscn b/Example/Tween/EGTween.tscn index 858b057..57a05b4 100644 --- a/Example/Tween/EGTween.tscn +++ b/Example/Tween/EGTween.tscn @@ -14,13 +14,8 @@ script = ExtResource("1_jpym0") Target = NodePath("Card1") [node name="Card1" type="Panel" parent="."] -custom_minimum_size = Vector2(90, 160) -layout_mode = 2 -offset_left = 390.0 -offset_top = 488.0 -offset_right = 480.0 -offset_bottom = 648.0 -grow_horizontal = 2 -grow_vertical = 0 +layout_mode = 1 +offset_right = 90.0 +offset_bottom = 160.0 pivot_offset = Vector2(45, 160) theme_override_styles/panel = ExtResource("2_cbb73") diff --git a/Example/Tween/Script/TweenTest.cs b/Example/Tween/Script/TweenTest.cs index 9abb0bc..3383349 100644 --- a/Example/Tween/Script/TweenTest.cs +++ b/Example/Tween/Script/TweenTest.cs @@ -22,6 +22,9 @@ namespace EGFramework.Examples.TweenAnime{ // tween2.SetLoops(); Tween tween3 = GetTree().CreateTween(); + tween3.SetEase(Tween.EaseType.InOut); + tween3.SetTrans(Tween.TransitionType.Cubic); + tween3.TweenInterval(0.5f); tween3.TweenProperty(Target,"size",new Vector2(100,40),0.5f); tween3.TweenProperty(Target,"size",new Vector2(40,100),0.5f); tween3.TweenProperty(Target,"size",new Vector2(40,40),0.5f);