From 5ec32f444717cef0ad64357e520bec5db4f0260f Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 17 Sep 2020 12:16:06 -0400 Subject: [PATCH] Removed shitty checkpoint animation --- src/Items/CheckPoint.gd | 1 - src/Items/CheckPoint.tscn | 112 +++++++++++++++++++------------------- 2 files changed, 57 insertions(+), 56 deletions(-) diff --git a/src/Items/CheckPoint.gd b/src/Items/CheckPoint.gd index 0ff10c6..8b3c716 100644 --- a/src/Items/CheckPoint.gd +++ b/src/Items/CheckPoint.gd @@ -15,7 +15,6 @@ func activate() -> void: if activated: return activated = true $AnimationPlayer.play("activated") - $Particles2D.amount = 200 $Particles2D.emitting = true emit_signal("activated", self) diff --git a/src/Items/CheckPoint.tscn b/src/Items/CheckPoint.tscn index 0555e19..f2698fe 100644 --- a/src/Items/CheckPoint.tscn +++ b/src/Items/CheckPoint.tscn @@ -4,48 +4,10 @@ [ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=2] [ext_resource path="res://src/Items/CheckPoint.gd" type="Script" id=3] -[sub_resource type="Gradient" id=1] -colors = PoolColorArray( 0.145098, 1, 1, 1, 0.941176, 0.713726, 0, 0.870588 ) - -[sub_resource type="GradientTexture" id=2] -gradient = SubResource( 1 ) - -[sub_resource type="Curve" id=3] -min_value = -200.0 -max_value = 200.0 -_data = [ Vector2( 0, 200 ), 0.0, -253.551, 0, 0, Vector2( 1, -200 ), 74.3008, 0.0, 0, 0 ] - -[sub_resource type="CurveTexture" id=4] -curve = SubResource( 3 ) - -[sub_resource type="Curve" id=5] -_data = [ Vector2( 0.00784314, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.0772727 ), 0.0, 0.0, 0, 0 ] - -[sub_resource type="CurveTexture" id=6] -curve = SubResource( 5 ) - -[sub_resource type="ParticlesMaterial" id=7] -emission_shape = 2 -emission_box_extents = Vector3( 4, 1, 1 ) -flag_disable_z = true -direction = Vector3( 0, -1, 0 ) -gravity = Vector3( 0, -1, 0 ) -initial_velocity = 100.0 -initial_velocity_random = 0.5 -orbit_velocity = 0.0 -orbit_velocity_random = 0.0 -linear_accel = 100.0 -linear_accel_random = 0.2 -linear_accel_curve = SubResource( 4 ) -scale = 1.5 -scale_random = 0.06 -scale_curve = SubResource( 6 ) -color_ramp = SubResource( 2 ) - -[sub_resource type="RectangleShape2D" id=8] +[sub_resource type="RectangleShape2D" id=1] extents = Vector2( 10, 11 ) -[sub_resource type="Animation" id=9] +[sub_resource type="Animation" id=2] length = 0.7 tracks/0/type = "value" tracks/0/path = NodePath("Light2D:enabled") @@ -110,7 +72,7 @@ tracks/4/keys = { } ] } -[sub_resource type="Animation" id=11] +[sub_resource type="Animation" id=3] resource_name = "active" length = 0.7 loop = true @@ -163,7 +125,7 @@ tracks/3/keys = { "values": [ Vector2( 1, 1 ), Vector2( 1.63405, 1.63405 ), Vector2( 2.21172, 2.21172 ), Vector2( 2.11387, 2.11387 ) ] } -[sub_resource type="Animation" id=10] +[sub_resource type="Animation" id=4] length = 0.7 loop = true tracks/0/type = "value" @@ -203,25 +165,56 @@ tracks/2/keys = { "values": [ 1, 2, 3, 4, 5, 6, 7, 8 ] } +[sub_resource type="Gradient" id=5] +colors = PoolColorArray( 0.145098, 1, 1, 1, 0.941176, 0.713726, 0, 0.870588 ) + +[sub_resource type="GradientTexture" id=6] +gradient = SubResource( 5 ) + +[sub_resource type="Curve" id=7] +min_value = -200.0 +max_value = 200.0 +_data = [ Vector2( 0, 200 ), 0.0, -253.551, 0, 0, Vector2( 1, -200 ), 74.3008, 0.0, 0, 0 ] + +[sub_resource type="CurveTexture" id=8] +curve = SubResource( 7 ) + +[sub_resource type="Curve" id=9] +_data = [ Vector2( 0.00784314, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.0772727 ), 0.0, 0.0, 0, 0 ] + +[sub_resource type="CurveTexture" id=10] +curve = SubResource( 9 ) + +[sub_resource type="ParticlesMaterial" id=11] +emission_shape = 2 +emission_box_extents = Vector3( 5, 4, 1 ) +flag_disable_z = true +direction = Vector3( 0, 0, 0 ) +spread = 0.0 +gravity = Vector3( 0, 0, 0 ) +initial_velocity_random = 0.5 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +linear_accel = 100.0 +linear_accel_random = 0.2 +linear_accel_curve = SubResource( 8 ) +angle = 31.8 +angle_random = 0.5 +scale = 1.5 +scale_random = 0.06 +scale_curve = SubResource( 10 ) +color_ramp = SubResource( 6 ) + [node name="CheckPoint" type="Node2D"] script = ExtResource( 3 ) -[node name="Particles2D" type="Particles2D" parent="."] -position = Vector2( 0, -5 ) -emitting = false -amount = 5 -lifetime = 0.4 -speed_scale = 0.5 -explosiveness = 0.22 -process_material = SubResource( 7 ) - [node name="Area2D" type="Area2D" parent="."] collision_layer = 16 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] visible = false position = Vector2( 0, -11 ) -shape = SubResource( 8 ) +shape = SubResource( 1 ) [node name="Sprite" type="Sprite" parent="."] position = Vector2( 0, -10 ) @@ -240,7 +233,16 @@ shadow_item_cull_mask = -2147483639 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] autoplay = "idle" -anims/activated = SubResource( 9 ) -anims/active = SubResource( 11 ) -anims/idle = SubResource( 10 ) +anims/activated = SubResource( 2 ) +anims/active = SubResource( 3 ) +anims/idle = SubResource( 4 ) + +[node name="Particles2D" type="Particles2D" parent="."] +position = Vector2( 0, -4.625 ) +emitting = false +amount = 7 +lifetime = 0.3 +speed_scale = 0.5 +explosiveness = 0.25 +process_material = SubResource( 11 ) [connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]