Explode entire minoes

This commit is contained in:
adrienmalin 2019-01-08 12:35:27 +01:00
parent fd4688a3ab
commit 8009ffdf7e
2 changed files with 14 additions and 44 deletions

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=7 format=2]
[ext_resource path="res://Tetrominos/Mino/MinoMaterial.tres" type="Material" id=1]
[ext_resource path="res://Tetrominos/Mino/MinoMesh.tres" type="CubeMesh" id=1]
[sub_resource type="Gradient" id=1]
@ -34,15 +34,15 @@ emission_box_extents = Vector3( 10, 1, 1 )
flag_align_y = false
flag_rotate_y = true
flag_disable_z = false
spread = 20.0
spread = 0.0
flatness = 0.0
gravity = Vector3( 0, -20, 0 )
initial_velocity = 15.0
initial_velocity_random = 0.8
gravity = Vector3( 0, -10, 30 )
initial_velocity = 20.0
initial_velocity_random = 1.0
angular_velocity = 97.14
angular_velocity_random = 1.0
linear_accel = 100.0
linear_accel_random = 0.84
linear_accel_random = 1.0
radial_accel = 8.48
radial_accel_random = 0.85
tangential_accel = 0.0
@ -61,36 +61,7 @@ anim_speed_random = 0.0
anim_offset = 0.0
anim_offset_random = 0.0
anim_loop = false
_sections_unfolded = [ "Angular Velocity", "Color", "Emission Shape", "Gravity", "Initial Velocity", "Scale", "Spread" ]
[sub_resource type="PrismMesh" id=6]
material = ExtResource( 1 )
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
left_to_right = 2.98023e-008
size = Vector3( 0.2, 0.2, 0.2 )
subdivide_width = 2
subdivide_height = 0
subdivide_depth = 0
[sub_resource type="PrismMesh" id=7]
material = ExtResource( 1 )
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
left_to_right = 0.5
size = Vector3( 0.2, 0.2, 0.2 )
subdivide_width = 2
subdivide_height = 0
subdivide_depth = 0
[sub_resource type="CubeMesh" id=8]
material = ExtResource( 1 )
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
size = Vector3( 0.2, 0.2, 0.2 )
subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
_sections_unfolded = [ "Angular Velocity", "Color", "Gravity", "Initial Velocity", "Linear Accel", "Scale", "Spread" ]
[node name="ExplodingLine" type="Particles" index="0"]
@ -104,23 +75,21 @@ lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
emitting = false
amount = 800
amount = 40
lifetime = 2.0
one_shot = true
preprocess = 0.0
speed_scale = 2.18
explosiveness = 0.9
randomness = 0.69
explosiveness = 1.0
randomness = 0.0
fixed_fps = 0
fract_delta = true
visibility_aabb = AABB( -5, -0.5, -1, 10, 1, 2 )
local_coords = false
draw_order = 0
process_material = SubResource( 5 )
draw_passes = 3
draw_pass_1 = SubResource( 6 )
draw_pass_2 = SubResource( 7 )
draw_pass_3 = SubResource( 8 )
draw_passes = 1
draw_pass_1 = ExtResource( 1 )
_sections_unfolded = [ "Draw Passes", "Drawing", "Process Material", "Time", "Transform" ]

View File

@ -58,5 +58,6 @@ func clear_lines():
for x in range(NB_COLLUMNS):
set_cell_item(x, y2, 0, get_cell_item(x, y2+1, 0))
lines_cleared += 1
exploding_lines[y].emitting = true
exploding_lines[y].restart()
return lines_cleared