From 48ef9f6470511877d237e0566b01a07111d6b186 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Wed, 7 Nov 2018 13:25:04 +0100 Subject: [PATCH] Remove particles on goal --- scenes/Goal.gd | 2 +- scenes/Goal.tscn | 79 ++---------------------------------------------- 2 files changed, 3 insertions(+), 78 deletions(-) diff --git a/scenes/Goal.gd b/scenes/Goal.gd index 0902305..ab66fd9 100644 --- a/scenes/Goal.gd +++ b/scenes/Goal.gd @@ -6,7 +6,7 @@ func _ready(): func collided(body): if body.has_method("reach_goal"): get_node("ShineRays").hide() - get_node("Particles").emitting = true + body.reach_goal() # Should be done in vertex shader diff --git a/scenes/Goal.tscn b/scenes/Goal.tscn index f7ff32e..4ede61b 100644 --- a/scenes/Goal.tscn +++ b/scenes/Goal.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://models/flag.glb" type="PackedScene" id=1] [ext_resource path="res://scenes/Goal.gd" type="Script" id=2] @@ -69,52 +69,7 @@ gradient = SubResource( 4 ) width = 2 _sections_unfolded = [ "Resource" ] -[sub_resource type="ParticlesMaterial" id=9] - -render_priority = 0 -trail_divisor = 1 -emission_shape = 0 -flag_align_y = false -flag_rotate_y = false -flag_disable_z = false -spread = 45.0 -flatness = 0.0 -gravity = Vector3( 0, -9.8, 0 ) -initial_velocity = 5.0 -initial_velocity_random = 0.0 -angular_velocity = 3.39 -angular_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 = 0.0 -damping_random = 0.0 -angle = 0.0 -angle_random = 0.0 -scale = 1.0 -scale_random = 0.0 -color = Color( 1, 1, 1, 1 ) -hue_variation = 0.0 -hue_variation_random = 0.0 -anim_speed = 0.0 -anim_speed_random = 0.0 -anim_offset = 0.0 -anim_offset_random = 0.0 -anim_loop = false -_sections_unfolded = [ "Angle", "Gravity", "Initial Velocity", "Resource", "Scale" ] - -[sub_resource type="CubeMesh" id=8] - -custom_aabb = AABB( 0, 0, 0, 0, 0, 0 ) -size = Vector3( 0.5, 0.5, 0.5 ) -subdivide_width = 0 -subdivide_height = 0 -subdivide_depth = 0 - -[node name="Scene Root" index="0" instance=ExtResource( 1 )] +[node name="Scene Root" instance=ExtResource( 1 )] script = ExtResource( 2 ) @@ -205,34 +160,4 @@ __meta__ = { "_edit_lock_": true } -[node name="Particles" type="Particles" parent="." index="5"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.26872, 0 ) -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -emitting = false -amount = 8 -lifetime = 1.0 -one_shot = false -preprocess = 0.0 -speed_scale = 1.0 -explosiveness = 0.5 -randomness = 0.0 -fixed_fps = 0 -fract_delta = true -visibility_aabb = AABB( -4, -4, -4.30868, 8, 8, 8.61736 ) -local_coords = true -draw_order = 0 -process_material = SubResource( 9 ) -draw_passes = 1 -draw_pass_1 = SubResource( 8 ) -_sections_unfolded = [ "Draw Passes", "Drawing", "Pause", "Process Material", "Time" ] -