Revert "clean up mess"

This reverts commit 80fb1421bd.
This commit is contained in:
adrienmalin
2019-01-01 04:21:03 +01:00
parent 80fb1421bd
commit 131e17975b
37 changed files with 1262 additions and 189 deletions

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=9 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]
[ext_resource path="res://Tetrominos/Mino/TrailMaterial.tres" type="Material" id=3]
[ext_resource path="res://Tetrominos/Mino/SpotLight.tscn" type="PackedScene" id=4]
[sub_resource type="SpatialMaterial" id=1]
@ -27,7 +28,7 @@ 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.520275 )
albedo_color = Color( 0.601563, 0.775878, 1, 0.270275 )
metallic = 0.68
metallic_specular = 1.0
metallic_texture_channel = 0
@ -55,7 +56,7 @@ uv2_triplanar_sharpness = 1.0
proximity_fade_enable = true
proximity_fade_distance = 1.0
distance_fade_enable = false
_sections_unfolded = [ "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
_sections_unfolded = [ "Albedo", "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
[sub_resource type="GradientTexture" id=2]
@ -72,7 +73,7 @@ flag_rotate_y = false
flag_disable_z = true
spread = 0.0
flatness = 0.0
gravity = Vector3( 0, -30, 0 )
gravity = Vector3( 0, 0, 0 )
initial_velocity = 0.0
initial_velocity_random = 0.0
angular_velocity = 0.0
@ -99,7 +100,16 @@ anim_speed_random = 0.0
anim_offset = 0.0
anim_offset_random = 0.0
anim_loop = false
_sections_unfolded = [ "Angular Velocity", "Color", "Gravity", "Initial Velocity" ]
_sections_unfolded = [ "Color", "Gravity" ]
[sub_resource type="CubeMesh" id=4]
material = ExtResource( 3 )
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"]
@ -107,13 +117,12 @@ _sections_unfolded = [ "Pause", "Transform", "Visibility" ]
[node name="MinoMesh" parent="." index="0" instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 1 )
mesh = ExtResource( 2 )
material/0 = null
_sections_unfolded = [ "Geometry", "Transform", "material" ]
[node name="Trail" type="Particles" parent="." index="1"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 0.5 )
visible = false
layers = 1
material_override = SubResource( 1 )
cast_shadow = 1
@ -123,8 +132,8 @@ lod_min_distance = 0.0
lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
emitting = true
amount = 10
emitting = false
amount = 4
lifetime = 0.1
one_shot = false
preprocess = 0.0
@ -133,12 +142,17 @@ explosiveness = 0.0
randomness = 0.0
fixed_fps = 0
fract_delta = true
visibility_aabb = AABB( -4, -4, -4, 8, 8, 8 )
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 = ExtResource( 2 )
_sections_unfolded = [ "Draw Passes", "Process Material", "Transform" ]
draw_pass_1 = SubResource( 4 )
_sections_unfolded = [ "Draw Passes", "Drawing", "Geometry", "LOD", "Process Material", "Time", "Transform" ]
[node name="SpotLight" parent="." index="2" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, -4.37114e-008, 1, 0, -1, -4.37114e-008, 0, 0, 1 )
light_energy = 4.0

View File

@ -1,15 +0,0 @@
extends MeshInstance
# class member variables go here, for example:
# var a = 2
# var b = "textvar"
func _ready():
# Called when the node is added to the scene for the first time.
# Initialization here
pass
#func _process(delta):
# # Called every frame. Delta is time since last frame.
# # Update game logic here.
# pass

File diff suppressed because one or more lines are too long

View File

@ -23,16 +23,16 @@ 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, 1 )
metallic = 0.68
albedo_color = Color( 0.601563, 0.775878, 1, 0.162157 )
metallic = 0.4
metallic_specular = 1.0
metallic_texture_channel = 0
roughness = 0.46
roughness_texture_channel = 0
emission_enabled = true
emission = Color( 0.71875, 0.897827, 1, 1 )
emission_energy = 0.3
emission_operator = 1
emission = Color( 0.755859, 1, 0.914169, 1 )
emission_energy = 0.7
emission_operator = 0
emission_on_uv2 = false
normal_enabled = false
rim_enabled = false
@ -55,5 +55,5 @@ uv2_triplanar_sharpness = 1.0
proximity_fade_enable = true
proximity_fade_distance = 1.0
distance_fade_enable = false
_sections_unfolded = [ "Emission", "NormalMap", "Proximity Fade", "Roughness" ]
_sections_unfolded = [ "Albedo", "Emission", "NormalMap", "Proximity Fade" ]

View File

@ -1,9 +1,12 @@
[gd_resource type="CubeMesh" format=2]
[gd_resource type="CubeMesh" load_steps=2 format=2]
[ext_resource path="res://Tetrominos/Mino/MinoMaterial.tres" type="Material" id=1]
[resource]
material = ExtResource( 1 )
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
size = Vector3( 0.9, 0.9, 1.9 )
size = Vector3( 0.9, 0.9, 0.9 )
subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0

View File

@ -3,6 +3,7 @@
[ext_resource path="res://Tetrominos/Mino/MinoMaterial.tres" type="Material" id=1]
[sub_resource type="CubeMesh" id=1]
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
@ -11,7 +12,7 @@ subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
[node name="Mino" type="MeshInstance"]
[node name="Mino" type="MeshInstance" index="0"]
layers = 1
material_override = null

View File

@ -23,7 +23,7 @@ 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.520275 )
albedo_color = Color( 0.601563, 0.775878, 1, 0.0196078 )
metallic = 0.68
metallic_specular = 1.0
metallic_texture_channel = 0
@ -51,5 +51,5 @@ uv2_triplanar_sharpness = 1.0
proximity_fade_enable = true
proximity_fade_distance = 1.0
distance_fade_enable = false
_sections_unfolded = [ "Proximity Fade" ]
_sections_unfolded = [ "Albedo", "Emission", "Proximity Fade" ]

View File

@ -1,4 +1,4 @@
extends "Tetrominos/Tetromino.gd"
extends "Tetromino.gd"
const CLOCKWISE = -1
const COUNTERCLOCKWISE = 1

View File

@ -1,6 +1,26 @@
extends Spatial
extends "Tetromino.gd"
const T_SLOT = [
Vector3(-1, 1, 0),
Vector3(1, 1, 0),
Vector3(1, -1, 0),
Vector3(-1, -1, 0)
]
var minos
func _ready():
minos = [$Mino, $Mino2, $Mino3, $Mino4]
func rotate(direction):
if .rotate(direction):
detect_t_spin()
return true
return false
func detect_t_spin():
var center = to_global(minoes[0].translation)
var a = not get_parent().is_free_cell(center + T_SLOT[orientation])
var b = not get_parent().is_free_cell(center + T_SLOT[(1+orientation)%4])
var c = not get_parent().is_free_cell(center + T_SLOT[(2+orientation)%4])
var d = not get_parent().is_free_cell(center + T_SLOT[(3+orientation)%4])
if a and b and (c or d):
t_spin = T_SPIN
elif c and d and (a or b):
if t_spin != T_SPIN:
t_spin = MINI_T_SPIN

View File

@ -4,24 +4,22 @@
[ext_resource path="res://Tetrominos/Mino/Mino.tscn" type="PackedScene" id=2]
[node name="TetroT" type="Spatial"]
[node name="TetroT" type="Spatial" index="0"]
script = ExtResource( 1 )
_sections_unfolded = [ "Transform" ]
[node name="Mino" parent="." index="0" instance=ExtResource( 2 )]
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
[node name="Mino2" parent="." index="1" instance=ExtResource( 2 )]
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
[node name="Mino3" parent="." index="2" instance=ExtResource( 2 )]
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
[node name="Mino4" parent="." index="3" instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )