Browse Source

fixed ease and trans

master
Z 5 months ago
parent
commit
f0cf78ebd5
  1. 11
      Example/Tween/EGTween.tscn
  2. 3
      Example/Tween/Script/TweenTest.cs

11
Example/Tween/EGTween.tscn

@ -14,13 +14,8 @@ script = ExtResource("1_jpym0") @@ -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")

3
Example/Tween/Script/TweenTest.cs

@ -22,6 +22,9 @@ namespace EGFramework.Examples.TweenAnime{ @@ -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);

Loading…
Cancel
Save