Commit 7b25b335 authored by Nathan Lovato's avatar Nathan Lovato
Browse files

Fix flying animation and rotation tween

parent 866010a4
Pipeline #5102 failed with stage
in 1 minute and 28 seconds
......@@ -94,7 +94,7 @@ tracks/0/keys = {
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
[node name="Game" type="Node2D" index="0"]
[node name="Game" type="Node2D"]
script = ExtResource( 1 )
......@@ -153,15 +153,6 @@ max_lines_visible = -1
position = Vector2( 190, 960 )
z_index = 1
input_pickable = false
collision_layer = 1
collision/safe_margin = 0.08
gravity = 4000.0
flap_force = 1200.0
max_fall_speed = 1200.0
max_angular_velocity = 3.14159
angular_acceleration = 6.28319
speed_horizontal = 280.0
[node name="Foreground" type="Node2D" parent="." index="2"]
......
......@@ -24,6 +24,7 @@ var _active = true setget _set_active
func _ready():
self._idle = true
tween.connect("tween_completed", self, "_on_Tween_tween_completed")
func set_idle(value):
......@@ -87,3 +88,7 @@ func _set_active(value):
_active = value
visible = value
collision_shape.disabled = not value
func _on_Tween_tween_completed(object, key):
tween.stop_all()
......@@ -5,23 +5,40 @@
[ext_resource path="res://Gnu/Camera2D.gd" type="Script" id=3]
[ext_resource path="res://assets/gnu.png" type="Texture" id=4]
[sub_resource type="Gradient" id=4]
[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 0.199029, 0.830097, 1 )
colors = PoolColorArray( 0.109804, 0.929412, 0.992157, 0, 0.109804, 0.929412, 0.992157, 1, 0.158255, 0.520581, 0.988132, 1, 0.109804, 0.494118, 0.992157, 0 )
[sub_resource type="GradientTexture" id=5]
gradient = SubResource( 4 )
[sub_resource type="GradientTexture" id=2]
flags = 4
gradient = SubResource( 1 )
width = 2048
[sub_resource type="Curve" id=6]
[sub_resource type="Curve" id=3]
min_value = 0.0
max_value = 1.0
bake_resolution = 100
_data = [ Vector2( 0, 0.521944 ), 0.0, -0.0460363, 0, 0, Vector2( 0.414574, 0.618744 ), 0.956195, 0.956195, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=7]
curve = SubResource( 6 )
[sub_resource type="CurveTexture" id=4]
flags = 4
width = 2048
curve = SubResource( 3 )
[sub_resource type="ParticlesMaterial" id=8]
[sub_resource type="ParticlesMaterial" id=5]
render_priority = 0
trail_divisor = 1
emission_shape = 1
emission_sphere_radius = 20.0
flag_align_y = false
flag_rotate_y = false
flag_disable_z = true
spread = 45.0
flatness = 0.32
gravity = Vector3( 0, -20, 0 )
initial_velocity = -100.0
......@@ -30,23 +47,38 @@ angular_velocity = 20.0
angular_velocity_random = 1.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
linear_accel = 0.0
linear_accel_random = 0.0
radial_accel = 0.0
radial_accel_random = 0.0
tangential_accel = 0.0
tangential_accel_random = 0.0
damping = 25.29
damping_random = 0.0
angle = 121.2
angle_random = 1.0
scale = 0.8
scale_random = 0.2
scale_curve = SubResource( 7 )
color_ramp = SubResource( 5 )
scale_curve = SubResource( 4 )
color_ramp = SubResource( 2 )
hue_variation = 0.02
hue_variation_random = 0.35
anim_speed = 0.0
anim_speed_random = 0.0
anim_offset = 0.0
anim_offset_random = 0.0
anim_loop = false
[sub_resource type="CircleShape2D" id=6]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 55.8274
[sub_resource type="Animation" id=2]
resource_name = "float"
[sub_resource type="Animation" id=7]
length = 2.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:position")
tracks/0/interp = 1
......@@ -72,9 +104,11 @@ tracks/1/keys = {
"values": [ 4.3, -7.0, 1.92708, 2.88061, 2.73285 ]
}
[sub_resource type="Animation" id=3]
resource_name = "idle"
[sub_resource type="Animation" id=8]
length = 0.001
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:position")
tracks/0/interp = 1
......@@ -100,30 +134,71 @@ tracks/1/keys = {
"values": [ 4.10578, 0.0 ]
}
[node name="Gnu" type="KinematicBody2D"]
[node name="Gnu" type="KinematicBody2D" index="0"]
input_pickable = false
collision_layer = 1
collision_mask = 6
collision/safe_margin = 0.08
script = ExtResource( 1 )
gravity = 4000.0
flap_force = 1200.0
max_fall_speed = 1200.0
max_angular_velocity = 3.14159
angular_acceleration = 6.28319
speed_horizontal = 280.0
[node name="PurpleMiasma" type="Particles2D" parent="." index="0"]
[node name="PurpleMiasma" type="Particles2D" parent="."]
position = Vector2( -44.9996, 4.58978 )
emitting = true
amount = 10
lifetime = 1.0
one_shot = false
preprocess = 2.0
speed_scale = 1.0
explosiveness = 0.0
randomness = 0.0
fixed_fps = 0
fract_delta = true
visibility_rect = Rect2( -100, -100, 200, 200 )
local_coords = false
process_material = SubResource( 8 )
draw_order = 0
process_material = SubResource( 5 )
texture = ExtResource( 2 )
normal_map = null
h_frames = 1
v_frames = 1
[node name="Camera2D" type="Camera2D" parent="." index="1"]
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2( 250, 0 )
anchor_mode = 1
rotating = false
current = true
process_mode = 0
zoom = Vector2( 1, 1 )
limit_left = -10000000
limit_top = -10000000
limit_right = 10000000
limit_bottom = 10000000
limit_smoothed = false
drag_margin_h_enabled = true
drag_margin_v_enabled = true
smoothing_enabled = false
smoothing_speed = 5.0
offset_v = 0.0
offset_h = -0.37
drag_margin_left = 0.0
drag_margin_top = 0.0
drag_margin_right = 0.0
drag_margin_bottom = 0.0
editor_draw_screen = true
editor_draw_limits = false
editor_draw_drag_margin = false
script = ExtResource( 3 )
[node name="Sprite" type="Sprite" parent="."]
[node name="Sprite" type="Sprite" parent="." index="2"]
editor/display_folded = true
position = Vector2( -66.5, 1 )
rotation = 0.0522559
......@@ -131,13 +206,28 @@ scale = Vector2( 0.786026, 0.786026 )
texture = ExtResource( 4 )
offset = Vector2( 84.6028, -31.3285 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="3"]
[node name="Tween" type="Tween" parent="."]
shape = SubResource( 6 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
[node name="Tween" type="Tween" parent="." index="4"]
repeat = false
playback_process_mode = 1
playback_speed = 1.0
playback/active = false
playback/repeat = false
playback/speed = 1.0
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="5"]
root_node = NodePath("..")
autoplay = "float"
anims/float = SubResource( 2 )
anims/idle = SubResource( 3 )
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/float = SubResource( 7 )
anims/idle = SubResource( 8 )
blend_times = [ ]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment