remove trail

This commit is contained in:
adrienmalin 2019-01-25 17:14:39 +01:00
parent 33ad2357ad
commit b79413f85c
4 changed files with 9 additions and 200 deletions

View File

@ -43,7 +43,7 @@ func new_game(level):
func new_piece():
current_piece = next_piece
current_piece.translation = $Matrix/Position3D.translation
current_piece.emit_trail(true)
current_piece.turn_light(true)
next_piece = random_piece()
next_piece.translation = $Next/Position3D.translation
if current_piece.move(THERE):
@ -157,11 +157,11 @@ func hold():
var swap = current_piece
current_piece = held_piece
held_piece = swap
held_piece.emit_trail(false)
held_piece.turn_light(false)
held_piece.translation = $Hold/Position3D.translation
if current_piece:
current_piece.translation = $Matrix/Position3D.translation
current_piece.emit_trail(true)
current_piece.turn_light(true)
else:
new_piece()

View File

@ -1,167 +1,8 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Tetrominos/Mino/MinoMesh.tscn" type="PackedScene" id=1]
[ext_resource path="res://Tetrominos/Mino/MinoMesh.tres" type="CubeMesh" id=2]
[sub_resource type="SpatialMaterial" id=1]
render_priority = 0
flags_transparent = true
flags_unshaded = false
flags_vertex_lighting = false
flags_no_depth_test = false
flags_use_point_size = false
flags_world_triplanar = false
flags_fixed_size = false
flags_albedo_tex_force_srgb = false
vertex_color_use_as_albedo = false
vertex_color_is_srgb = false
params_diffuse_mode = 0
params_specular_mode = 0
params_blend_mode = 1
params_cull_mode = 0
params_depth_draw_mode = 0
params_line_width = 1.0
params_point_size = 1.0
params_billboard_mode = 0
params_grow = false
params_use_alpha_scissor = false
albedo_color = Color( 0.601563, 0.775878, 1, 0.270275 )
metallic = 0.68
metallic_specular = 1.0
metallic_texture_channel = 0
roughness = 0.0
roughness_texture_channel = 0
emission_enabled = false
normal_enabled = false
rim_enabled = false
clearcoat_enabled = false
anisotropy_enabled = false
ao_enabled = false
depth_enabled = false
subsurf_scatter_enabled = false
transmission_enabled = false
refraction_enabled = false
detail_enabled = false
uv1_scale = Vector3( 1, 1, 1 )
uv1_offset = Vector3( 0, 0, 0 )
uv1_triplanar = false
uv1_triplanar_sharpness = 1.0
uv2_scale = Vector3( 1, 1, 1 )
uv2_offset = Vector3( 0, 0, 0 )
uv2_triplanar = false
uv2_triplanar_sharpness = 1.0
proximity_fade_enable = true
proximity_fade_distance = 1.0
distance_fade_enable = false
_sections_unfolded = [ "Albedo", "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
[sub_resource type="GradientTexture" id=2]
flags = 4
width = 2048
[sub_resource type="ParticlesMaterial" id=3]
render_priority = 0
trail_divisor = 1
emission_shape = 0
flag_align_y = false
flag_rotate_y = false
flag_disable_z = true
spread = 0.0
flatness = 0.0
gravity = Vector3( 0, 0, 0 )
initial_velocity = 0.0
initial_velocity_random = 0.0
angular_velocity = 0.0
angular_velocity_random = 0.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 = 0.0
damping_random = 0.0
angle = 0.0
angle_random = 0.0
scale = 1.0
scale_random = 0.0
color_ramp = SubResource( 2 )
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 = [ "Color", "Gravity" ]
[sub_resource type="SpatialMaterial" id=4]
render_priority = 0
flags_transparent = true
flags_unshaded = false
flags_vertex_lighting = false
flags_no_depth_test = false
flags_use_point_size = false
flags_world_triplanar = false
flags_fixed_size = false
flags_albedo_tex_force_srgb = false
vertex_color_use_as_albedo = false
vertex_color_is_srgb = false
params_diffuse_mode = 0
params_specular_mode = 0
params_blend_mode = 1
params_cull_mode = 0
params_depth_draw_mode = 0
params_line_width = 1.0
params_point_size = 1.0
params_billboard_mode = 0
params_grow = false
params_use_alpha_scissor = false
albedo_color = Color( 0.601563, 0.775878, 1, 0.0045098 )
metallic = 0.68
metallic_specular = 1.0
metallic_texture_channel = 0
roughness = 0.0
roughness_texture_channel = 0
emission_enabled = false
normal_enabled = false
rim_enabled = false
clearcoat_enabled = false
anisotropy_enabled = false
ao_enabled = false
depth_enabled = false
subsurf_scatter_enabled = false
transmission_enabled = false
refraction_enabled = false
detail_enabled = false
uv1_scale = Vector3( 1, 1, 1 )
uv1_offset = Vector3( 0, 0, 0 )
uv1_triplanar = false
uv1_triplanar_sharpness = 1.0
uv2_scale = Vector3( 1, 1, 1 )
uv2_offset = Vector3( 0, 0, 0 )
uv2_triplanar = false
uv2_triplanar_sharpness = 1.0
proximity_fade_enable = true
proximity_fade_distance = 1.0
distance_fade_enable = false
_sections_unfolded = [ "Albedo", "Emission", "Proximity Fade" ]
[sub_resource type="CubeMesh" id=5]
material = SubResource( 4 )
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
size = Vector3( 0.9, 0.9, 0.9 )
subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
[node name="Mino" type="Spatial" index="0"]
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
@ -173,36 +14,7 @@ mesh = ExtResource( 2 )
material/0 = null
_sections_unfolded = [ "Geometry", "Transform", "material" ]
[node name="Trail" type="Particles" parent="." index="1"]
layers = 1
material_override = SubResource( 1 )
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 = 4
lifetime = 0.1
one_shot = false
preprocess = 0.0
speed_scale = 1.0
explosiveness = 0.0
randomness = 0.0
fixed_fps = 0
fract_delta = true
visibility_aabb = AABB( -0.5, -0.5, -0.5, 1, 1, 1 )
local_coords = false
draw_order = 0
process_material = SubResource( 3 )
draw_passes = 1
draw_pass_1 = SubResource( 5 )
_sections_unfolded = [ "Draw Passes", "Drawing", "Geometry", "LOD", "Process Material", "Time", "Transform" ]
[node name="SpotLight" type="SpotLight" parent="." index="2"]
[node name="SpotLight" type="SpotLight" parent="." index="1"]
transform = Transform( 1, 0, 0, 0, 0.0174524, 0.999848, 0, -0.999848, 0.0174524, 0, 4, 1 )
layers = 1

View File

@ -31,7 +31,7 @@ roughness = 0.46
roughness_texture_channel = 0
emission_enabled = true
emission = Color( 0.755859, 1, 0.914169, 1 )
emission_energy = 0.1
emission_energy = 0.15
emission_operator = 0
emission_on_uv2 = false
normal_enabled = false

View File

@ -127,10 +127,7 @@ func turn(direction):
func t_spin():
return ""
func emit_trail(visible):
var trail
func turn_light(on):
for mino in minoes:
trail = mino.get_node("Trail")
trail.emitting = visible
trail.visible = visible
mino.get_node("SpotLight").visible = visible
mino.get_node("SpotLight").visible = on