Compare commits
87 Commits
Author | SHA1 | Date | |
---|---|---|---|
28e91bed1d | |||
ccd0f5d8f3 | |||
e37cb87622 | |||
bdbeb399d5 | |||
976bc01c20 | |||
4424107f16 | |||
bdba103417 | |||
9e42789e1e | |||
667cde38a1 | |||
f2655a075e | |||
92b97dbfb3 | |||
ac6e561c3d | |||
6e75bcf968 | |||
a9118f0563 | |||
33f7994997 | |||
c4ce4af524 | |||
1df8562765 | |||
9d43e6346d | |||
cdec5e6c2e | |||
cad0577e54 | |||
e6d4ef2c67 | |||
d1bc3ac764 | |||
b79413f85c | |||
33ad2357ad | |||
57d3cf0a35 | |||
cf63698dde | |||
4dc5d2a753 | |||
d8faef57f1 | |||
8600318dc7 | |||
549a2c4efd | |||
68929207d8 | |||
4b290ad45b | |||
adbbf97f3c | |||
79ad3143f6 | |||
cb6eab47aa | |||
200e1df265 | |||
0681cc8f98 | |||
2df1cce500 | |||
a8e94191bc | |||
92d81ef547 | |||
2d7a427ba2 | |||
19e64e3948 | |||
b1c37e73f4 | |||
b7650efdf6 | |||
231ba2fbff | |||
a1fb70a3ee | |||
8435997cc4 | |||
8eb3aba5d5 | |||
f3e61d319f | |||
c4aee1c2bc | |||
f220739ffc | |||
1b5cccd8c9 | |||
685acd4589 | |||
831d07d436 | |||
1829102bb1 | |||
4cde8ff47f | |||
e9152d7d81 | |||
ba8184af9d | |||
9f31c97391 | |||
e5778812bc | |||
d89c65333e | |||
52743e8ad2 | |||
52c1300d09 | |||
50b3e35859 | |||
e9f3d7dc14 | |||
c64c4afd89 | |||
e714b7cbaf | |||
63728c90c6 | |||
9e9779b8a9 | |||
25d865bcbb | |||
73d3e59d93 | |||
8c7a4bef17 | |||
0b909091b7 | |||
8cc69e99da | |||
1cec50f4f6 | |||
6e9f5659ae | |||
69a21fe12f | |||
11e6e07098 | |||
a8dced21f1 | |||
c338885d67 | |||
dc7a6bd488 | |||
88f5dfb00f | |||
2417bd5b56 | |||
d7768f08ea | |||
05f61c76db | |||
5419864859 | |||
a915251506 |
5
.gitignore
vendored
@ -9,4 +9,7 @@ export_presets.cfg
|
|||||||
|
|
||||||
midi/FluidR3 GM.sf2
|
midi/FluidR3 GM.sf2
|
||||||
release/
|
release/
|
||||||
*.import
|
*.import
|
||||||
|
*.tmp
|
||||||
|
|
||||||
|
desktop.ini
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
[Downloads](https://github.com/adrienmalin/TETRIS3000/releases)
|
[Downloads](https://github.com/adrienmalin/TETRIS3000/releases)
|
||||||
|
|
||||||
[Play in browser (experimental)](https://adrienmalin.github.io/TETRIS3000/web/TETRIS3000.html)
|
[Play in browser](https://adrienmalin.github.io/TETRIS3000/web/TETRIS3000.html) (Firefox recommanded)
|
||||||
|
|
||||||
|
22
source/Environment.tres
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[gd_resource type="Environment" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="PanoramaSky" id=1]
|
||||||
|
|
||||||
|
radiance_size = 0
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
|
||||||
|
resource_local_to_scene = true
|
||||||
|
background_mode = 1
|
||||||
|
background_sky = SubResource( 1 )
|
||||||
|
background_color = Color( 0.027451, 0.0352941, 0.0666667, 1 )
|
||||||
|
background_energy = 0.0
|
||||||
|
ambient_light_color = Color( 0.86908, 0.949502, 0.958984, 1 )
|
||||||
|
ambient_light_energy = 2.0
|
||||||
|
ambient_light_sky_contribution = 0.92
|
||||||
|
tonemap_mode = 3
|
||||||
|
auto_exposure_max_luma = 0.26
|
||||||
|
glow_intensity = 6.17
|
||||||
|
adjustment_brightness = 0.27
|
||||||
|
adjustment_saturation = 0.34
|
||||||
|
|
@ -11,6 +11,4 @@ func print(text):
|
|||||||
|
|
||||||
func _on_AnimationPlayer_animation_finished(anim_name):
|
func _on_AnimationPlayer_animation_finished(anim_name):
|
||||||
texts.resize(0)
|
texts.resize(0)
|
||||||
|
|
||||||
func _on_Stats_flash_text(text):
|
|
||||||
self.print(text)
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
extends GridMap
|
extends GridMap
|
||||||
|
|
||||||
const Tetromino = preload("res://Tetrominos/Tetromino.gd")
|
const Tetromino = preload("res://Tetrominos/Tetromino.gd")
|
||||||
const ExplodingLine = preload("res://ExplodingLine.tscn")
|
const ExplodingMino = preload("res://Tetrominos/Mino/ExplodingMino.tscn")
|
||||||
|
|
||||||
const EMPTY_CELL = -1
|
const EMPTY_CELL = -1
|
||||||
const MINO = 0
|
const MINO = 0
|
||||||
|
|
||||||
var exploding_lines = []
|
var exploding_minoes = []
|
||||||
var nb_collumns
|
var nb_collumns
|
||||||
var nb_lines
|
var nb_lines
|
||||||
|
|
||||||
@ -14,9 +14,11 @@ func _ready():
|
|||||||
nb_collumns = int(get_parent().scale.x)
|
nb_collumns = int(get_parent().scale.x)
|
||||||
nb_lines = int(get_parent().scale.y)
|
nb_lines = int(get_parent().scale.y)
|
||||||
for y in range(nb_lines):
|
for y in range(nb_lines):
|
||||||
exploding_lines.append(ExplodingLine.instance())
|
exploding_minoes.append([])
|
||||||
add_child(exploding_lines[y])
|
for x in range(nb_collumns):
|
||||||
exploding_lines[y].translation = Vector3(nb_collumns/2, y, 1)
|
exploding_minoes[y].append(ExplodingMino.instance())
|
||||||
|
add_child(exploding_minoes[y][x])
|
||||||
|
exploding_minoes[y][x].translation = Vector3(x, y, 0)
|
||||||
|
|
||||||
func clear():
|
func clear():
|
||||||
for used_cell in get_used_cells():
|
for used_cell in get_used_cells():
|
||||||
@ -52,10 +54,9 @@ func lock(piece):
|
|||||||
return minoes_over_grid < Tetromino.NB_MINOES
|
return minoes_over_grid < Tetromino.NB_MINOES
|
||||||
|
|
||||||
func clear_lines():
|
func clear_lines():
|
||||||
var line_cleared
|
|
||||||
var lines_cleared = 0
|
var lines_cleared = 0
|
||||||
for y in range(nb_lines-1, -1, -1):
|
for y in range(nb_lines-1, -1, -1):
|
||||||
line_cleared = true
|
var line_cleared = true
|
||||||
for x in range(nb_collumns):
|
for x in range(nb_collumns):
|
||||||
if not get_cell_item(x, y, 0) == MINO:
|
if not get_cell_item(x, y, 0) == MINO:
|
||||||
line_cleared = false
|
line_cleared = false
|
||||||
@ -63,8 +64,10 @@ func clear_lines():
|
|||||||
if line_cleared:
|
if line_cleared:
|
||||||
for y2 in range(y, nb_lines+2):
|
for y2 in range(y, nb_lines+2):
|
||||||
for x in range(nb_collumns):
|
for x in range(nb_collumns):
|
||||||
set_cell_item(x, y2, 0, get_cell_item(x, y2+1, 0))
|
var above_cell = get_cell_item(x, y2+1, 0)
|
||||||
|
set_cell_item(x, y2, 0, above_cell)
|
||||||
lines_cleared += 1
|
lines_cleared += 1
|
||||||
exploding_lines[y].emitting = true
|
for x in range(nb_collumns):
|
||||||
exploding_lines[y].restart()
|
exploding_minoes[y][x].emitting = true
|
||||||
|
exploding_minoes[y][x].restart()
|
||||||
return lines_cleared
|
return lines_cleared
|
@ -27,6 +27,9 @@ var autoshift_action
|
|||||||
|
|
||||||
var playing = false
|
var playing = false
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
randomize()
|
||||||
|
|
||||||
func new_game(level):
|
func new_game(level):
|
||||||
$Start.visible = false
|
$Start.visible = false
|
||||||
next_piece = random_piece()
|
next_piece = random_piece()
|
||||||
@ -40,10 +43,10 @@ func new_game(level):
|
|||||||
func new_piece():
|
func new_piece():
|
||||||
current_piece = next_piece
|
current_piece = next_piece
|
||||||
current_piece.translation = $Matrix/Position3D.translation
|
current_piece.translation = $Matrix/Position3D.translation
|
||||||
current_piece.emit_trail(true)
|
current_piece.move_ghost()
|
||||||
next_piece = random_piece()
|
next_piece = random_piece()
|
||||||
next_piece.translation = $Next/Position3D.translation
|
next_piece.translation = $Next/Position3D.translation
|
||||||
if current_piece.move(THERE):
|
if $Matrix/GridMap.possible_positions(current_piece.get_translations(), THERE):
|
||||||
$DropTimer.start()
|
$DropTimer.start()
|
||||||
current_piece_held = false
|
current_piece_held = false
|
||||||
else:
|
else:
|
||||||
@ -63,7 +66,7 @@ func random_piece():
|
|||||||
|
|
||||||
func new_level(level):
|
func new_level(level):
|
||||||
if level <= 15:
|
if level <= 15:
|
||||||
$DropTimer.wait_time = pow(0.8 - ((level - 1) * 0.007), level - 1)
|
$DropTimer.wait_time = pow(0.8 - ((level-1)*0.007), level-1)
|
||||||
else:
|
else:
|
||||||
$LockDelay.wait_time = 0.5 * pow(0.9, level-15)
|
$LockDelay.wait_time = 0.5 * pow(0.9, level-15)
|
||||||
|
|
||||||
@ -71,7 +74,7 @@ func _unhandled_input(event):
|
|||||||
if event.is_action_pressed("pause"):
|
if event.is_action_pressed("pause"):
|
||||||
if playing:
|
if playing:
|
||||||
pause($controls_ui)
|
pause($controls_ui)
|
||||||
elif $controls_ui.enable_resume:
|
else:
|
||||||
resume()
|
resume()
|
||||||
if event.is_action_pressed("toggle_fullscreen"):
|
if event.is_action_pressed("toggle_fullscreen"):
|
||||||
OS.window_fullscreen = not OS.window_fullscreen
|
OS.window_fullscreen = not OS.window_fullscreen
|
||||||
@ -80,28 +83,26 @@ func _unhandled_input(event):
|
|||||||
$AutoShiftDelay.stop()
|
$AutoShiftDelay.stop()
|
||||||
$AutoShiftTimer.stop()
|
$AutoShiftTimer.stop()
|
||||||
autoshift_action = ""
|
autoshift_action = ""
|
||||||
for action in movements:
|
process_new_action(Input)
|
||||||
if Input.is_action_pressed(action):
|
else:
|
||||||
autoshift_action = action
|
process_new_action(event)
|
||||||
process_autoshift()
|
|
||||||
$AutoShiftDelay.start()
|
|
||||||
break
|
|
||||||
for action in movements:
|
|
||||||
if action != autoshift_action:
|
|
||||||
if event.is_action_pressed(action):
|
|
||||||
$AutoShiftTimer.stop()
|
|
||||||
autoshift_action = action
|
|
||||||
process_autoshift()
|
|
||||||
$AutoShiftDelay.start()
|
|
||||||
break
|
|
||||||
if event.is_action_pressed("hard_drop"):
|
if event.is_action_pressed("hard_drop"):
|
||||||
hard_drop()
|
hard_drop()
|
||||||
if event.is_action_pressed("rotate_clockwise"):
|
if event.is_action_pressed("rotate_clockwise"):
|
||||||
current_piece.rotate(Tetromino.CLOCKWISE)
|
current_piece.turn(Tetromino.CLOCKWISE)
|
||||||
if event.is_action_pressed("rotate_counterclockwise"):
|
if event.is_action_pressed("rotate_counterclockwise"):
|
||||||
current_piece.rotate(Tetromino.COUNTERCLOCKWISE)
|
current_piece.turn(Tetromino.COUNTERCLOCKWISE)
|
||||||
if event.is_action_pressed("hold"):
|
if event.is_action_pressed("hold"):
|
||||||
hold()
|
hold()
|
||||||
|
|
||||||
|
func process_new_action(event):
|
||||||
|
for action in movements:
|
||||||
|
if action != autoshift_action and event.is_action_pressed(action):
|
||||||
|
$AutoShiftTimer.stop()
|
||||||
|
autoshift_action = action
|
||||||
|
process_autoshift()
|
||||||
|
$AutoShiftDelay.start()
|
||||||
|
break
|
||||||
|
|
||||||
func _on_AutoShiftDelay_timeout():
|
func _on_AutoShiftDelay_timeout():
|
||||||
if autoshift_action:
|
if autoshift_action:
|
||||||
@ -122,19 +123,30 @@ func hard_drop():
|
|||||||
while current_piece.move(movements["soft_drop"]):
|
while current_piece.move(movements["soft_drop"]):
|
||||||
score += 2
|
score += 2
|
||||||
$Stats.piece_dropped(score)
|
$Stats.piece_dropped(score)
|
||||||
|
var translations = current_piece.get_translations()
|
||||||
|
for i in range(Tetromino.NB_MINOES):
|
||||||
|
get_node("Matrix/DropTrail/"+str(i)).translation = translations[i]
|
||||||
|
$Matrix/DropTrail.visible = true
|
||||||
|
$Matrix/DropTrail/Delay.start()
|
||||||
$LockDelay.stop()
|
$LockDelay.stop()
|
||||||
lock()
|
lock()
|
||||||
|
|
||||||
|
func _on_DropTrailDelay_timeout():
|
||||||
|
$Matrix/DropTrail.visible = false
|
||||||
|
|
||||||
func _on_DropTimer_timeout():
|
func _on_DropTimer_timeout():
|
||||||
if not current_piece.move(movements["soft_drop"]):
|
current_piece.move(movements["soft_drop"])
|
||||||
if $LockDelay.is_stopped():
|
|
||||||
lock()
|
func _on_LockDelay_timeout():
|
||||||
|
if not $Matrix/GridMap.possible_positions(current_piece.get_translations(), movements["soft_drop"]):
|
||||||
|
lock()
|
||||||
|
|
||||||
func lock():
|
func lock():
|
||||||
if $Matrix/GridMap.lock(current_piece):
|
if $Matrix/GridMap.lock(current_piece):
|
||||||
|
var t_spin = current_piece.t_spin()
|
||||||
var lines_cleared = $Matrix/GridMap.clear_lines()
|
var lines_cleared = $Matrix/GridMap.clear_lines()
|
||||||
$Stats.piece_locked(lines_cleared, current_piece.t_spin)
|
$Stats.piece_locked(lines_cleared, t_spin)
|
||||||
if lines_cleared or current_piece.t_spin:
|
if lines_cleared or t_spin:
|
||||||
$MidiPlayer.piece_locked(lines_cleared)
|
$MidiPlayer.piece_locked(lines_cleared)
|
||||||
remove_child(current_piece)
|
remove_child(current_piece)
|
||||||
new_piece()
|
new_piece()
|
||||||
@ -147,18 +159,18 @@ func hold():
|
|||||||
var swap = current_piece
|
var swap = current_piece
|
||||||
current_piece = held_piece
|
current_piece = held_piece
|
||||||
held_piece = swap
|
held_piece = swap
|
||||||
held_piece.emit_trail(false)
|
for mino in held_piece.minoes:
|
||||||
|
mino.get_node("LockingMesh").visible = false
|
||||||
held_piece.translation = $Hold/Position3D.translation
|
held_piece.translation = $Hold/Position3D.translation
|
||||||
if current_piece:
|
if current_piece:
|
||||||
current_piece.translation = $Matrix/Position3D.translation
|
current_piece.translation = $Matrix/Position3D.translation
|
||||||
current_piece.emit_trail(true)
|
current_piece.move_ghost()
|
||||||
else:
|
else:
|
||||||
new_piece()
|
new_piece()
|
||||||
|
|
||||||
func resume():
|
func resume():
|
||||||
playing = true
|
playing = true
|
||||||
$DropTimer.start()
|
$DropTimer.start()
|
||||||
$LockDelay.start()
|
|
||||||
$Stats.time = OS.get_system_time_secs() - $Stats.time
|
$Stats.time = OS.get_system_time_secs() - $Stats.time
|
||||||
$Stats/Clock.start()
|
$Stats/Clock.start()
|
||||||
$MidiPlayer.resume()
|
$MidiPlayer.resume()
|
||||||
@ -169,6 +181,7 @@ func resume():
|
|||||||
$Hold.visible = true
|
$Hold.visible = true
|
||||||
$Next.visible = true
|
$Next.visible = true
|
||||||
current_piece.visible = true
|
current_piece.visible = true
|
||||||
|
$Ghost.visible = true
|
||||||
if held_piece:
|
if held_piece:
|
||||||
held_piece.visible = true
|
held_piece.visible = true
|
||||||
next_piece.visible = true
|
next_piece.visible = true
|
||||||
@ -190,13 +203,13 @@ func pause(gui=null):
|
|||||||
$Hold.visible = false
|
$Hold.visible = false
|
||||||
$Next.visible = false
|
$Next.visible = false
|
||||||
current_piece.visible = false
|
current_piece.visible = false
|
||||||
|
$Ghost.visible = false
|
||||||
if held_piece:
|
if held_piece:
|
||||||
held_piece.visible = false
|
held_piece.visible = false
|
||||||
next_piece.visible = false
|
next_piece.visible = false
|
||||||
|
|
||||||
func game_over():
|
func game_over():
|
||||||
pause()
|
pause()
|
||||||
current_piece.emit_trail(false)
|
|
||||||
$FlashText.print("GAME\nOVER")
|
$FlashText.print("GAME\nOVER")
|
||||||
$ReplayButton.visible = true
|
$ReplayButton.visible = true
|
||||||
|
|
||||||
|
534
source/Main.tscn
@ -1,188 +1,49 @@
|
|||||||
[gd_scene load_steps=21 format=2]
|
[gd_scene load_steps=22 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
[ext_resource path="res://Environment.tres" type="Environment" id=1]
|
||||||
[ext_resource path="res://aperture-vintage-472251-unsplash.jpg" type="Texture" id=2]
|
[ext_resource path="res://Main.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://Tetrominos/Mino/MinoLibrary.tres" type="MeshLibrary" id=3]
|
[ext_resource path="res://aperture-vintage-472251-unsplash.jpg" type="Texture" id=3]
|
||||||
[ext_resource path="res://GridMap.gd" type="Script" id=4]
|
[ext_resource path="res://Tetrominos/Mino/MinoLibrary.tres" type="MeshLibrary" id=4]
|
||||||
[ext_resource path="res://midi/MidiPlayer.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://GridMap.gd" type="Script" id=5]
|
||||||
[ext_resource path="res://MidiPlayer.gd" type="Script" id=6]
|
[ext_resource path="res://Tetrominos/Mino/drop_trail.png" type="Texture" id=6]
|
||||||
[ext_resource path="res://FlashText.gd" type="Script" id=7]
|
[ext_resource path="res://midi/MidiPlayer.tscn" type="PackedScene" id=7]
|
||||||
[ext_resource path="res://fonts/525-ROUN.TTF" type="DynamicFontData" id=8]
|
[ext_resource path="res://MidiPlayer.gd" type="Script" id=8]
|
||||||
[ext_resource path="res://Stats.tscn" type="PackedScene" id=9]
|
[ext_resource path="res://FlashText.gd" type="Script" id=9]
|
||||||
[ext_resource path="res://controls.tscn" type="PackedScene" id=10]
|
[ext_resource path="res://fonts/525-ROUN.TTF" type="DynamicFontData" id=10]
|
||||||
[ext_resource path="res://Start.tscn" type="PackedScene" id=11]
|
[ext_resource path="res://Stats.tscn" type="PackedScene" id=11]
|
||||||
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=12]
|
[ext_resource path="res://controls.tscn" type="PackedScene" id=12]
|
||||||
|
[ext_resource path="res://Start.tscn" type="PackedScene" id=13]
|
||||||
|
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=14]
|
||||||
|
[ext_resource path="res://Tetrominos/Ghost.tscn" type="PackedScene" id=15]
|
||||||
|
|
||||||
[sub_resource type="PanoramaSky" id=1]
|
[sub_resource type="SpatialMaterial" id=1]
|
||||||
|
|
||||||
radiance_size = 0
|
|
||||||
|
|
||||||
[sub_resource type="Environment" id=2]
|
|
||||||
|
|
||||||
resource_local_to_scene = true
|
|
||||||
background_mode = 0
|
|
||||||
background_sky = SubResource( 1 )
|
|
||||||
background_sky_custom_fov = 0.0
|
|
||||||
background_color = Color( 0, 0, 0, 1 )
|
|
||||||
background_energy = 0.0
|
|
||||||
background_canvas_max_layer = 0
|
|
||||||
ambient_light_color = Color( 0.86908, 0.949502, 0.958984, 1 )
|
|
||||||
ambient_light_energy = 2.0
|
|
||||||
ambient_light_sky_contribution = 0.92
|
|
||||||
fog_enabled = false
|
|
||||||
fog_color = Color( 0.5, 0.6, 0.7, 1 )
|
|
||||||
fog_sun_color = Color( 1, 0.9, 0.7, 1 )
|
|
||||||
fog_sun_amount = 0.0
|
|
||||||
fog_depth_enabled = true
|
|
||||||
fog_depth_begin = 10.0
|
|
||||||
fog_depth_curve = 1.0
|
|
||||||
fog_transmit_enabled = false
|
|
||||||
fog_transmit_curve = 1.0
|
|
||||||
fog_height_enabled = false
|
|
||||||
fog_height_min = 0.0
|
|
||||||
fog_height_max = 100.0
|
|
||||||
fog_height_curve = 1.0
|
|
||||||
tonemap_mode = 3
|
|
||||||
tonemap_exposure = 1.0
|
|
||||||
tonemap_white = 1.0
|
|
||||||
auto_exposure_enabled = false
|
|
||||||
auto_exposure_scale = 0.4
|
|
||||||
auto_exposure_min_luma = 0.05
|
|
||||||
auto_exposure_max_luma = 0.26
|
|
||||||
auto_exposure_speed = 0.5
|
|
||||||
ss_reflections_enabled = false
|
|
||||||
ss_reflections_max_steps = 64
|
|
||||||
ss_reflections_fade_in = 0.15
|
|
||||||
ss_reflections_fade_out = 2.0
|
|
||||||
ss_reflections_depth_tolerance = 0.2
|
|
||||||
ss_reflections_roughness = true
|
|
||||||
ssao_enabled = false
|
|
||||||
ssao_radius = 1.0
|
|
||||||
ssao_intensity = 1.0
|
|
||||||
ssao_radius2 = 0.0
|
|
||||||
ssao_intensity2 = 1.0
|
|
||||||
ssao_bias = 0.01
|
|
||||||
ssao_light_affect = 0.0
|
|
||||||
ssao_color = Color( 0, 0, 0, 1 )
|
|
||||||
ssao_quality = 0
|
|
||||||
ssao_blur = 3
|
|
||||||
ssao_edge_sharpness = 4.0
|
|
||||||
dof_blur_far_enabled = false
|
|
||||||
dof_blur_far_distance = 10.0
|
|
||||||
dof_blur_far_transition = 5.0
|
|
||||||
dof_blur_far_amount = 0.1
|
|
||||||
dof_blur_far_quality = 1
|
|
||||||
dof_blur_near_enabled = false
|
|
||||||
dof_blur_near_distance = 2.0
|
|
||||||
dof_blur_near_transition = 1.0
|
|
||||||
dof_blur_near_amount = 0.1
|
|
||||||
dof_blur_near_quality = 1
|
|
||||||
glow_enabled = false
|
|
||||||
glow_levels/1 = false
|
|
||||||
glow_levels/2 = false
|
|
||||||
glow_levels/3 = true
|
|
||||||
glow_levels/4 = false
|
|
||||||
glow_levels/5 = true
|
|
||||||
glow_levels/6 = false
|
|
||||||
glow_levels/7 = false
|
|
||||||
glow_intensity = 6.17
|
|
||||||
glow_strength = 1.0
|
|
||||||
glow_bloom = 0.0
|
|
||||||
glow_blend_mode = 2
|
|
||||||
glow_hdr_threshold = 1.0
|
|
||||||
glow_hdr_scale = 2.0
|
|
||||||
glow_bicubic_upscale = false
|
|
||||||
adjustment_enabled = false
|
|
||||||
adjustment_brightness = 0.27
|
|
||||||
adjustment_contrast = 1.0
|
|
||||||
adjustment_saturation = 0.34
|
|
||||||
_sections_unfolded = [ "Adjustments", "Ambient Light", "Background", "Resource" ]
|
|
||||||
|
|
||||||
[sub_resource type="SpatialMaterial" id=3]
|
|
||||||
|
|
||||||
render_priority = 0
|
|
||||||
flags_transparent = true
|
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_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.00784314 )
|
albedo_color = Color( 0.601563, 0.775878, 1, 0.00784314 )
|
||||||
metallic = 0.0
|
|
||||||
metallic_specular = 0.0
|
metallic_specular = 0.0
|
||||||
metallic_texture_channel = 0
|
|
||||||
roughness = 0.46
|
roughness = 0.46
|
||||||
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_enable = true
|
||||||
proximity_fade_distance = 1.0
|
proximity_fade_distance = 1.0
|
||||||
distance_fade_enable = false
|
|
||||||
_sections_unfolded = [ "Albedo", "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
|
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=4]
|
[sub_resource type="CubeMesh" id=2]
|
||||||
|
|
||||||
material = SubResource( 3 )
|
material = SubResource( 1 )
|
||||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
|
||||||
size = Vector3( 1, 1, 1 )
|
size = Vector3( 1, 1, 1 )
|
||||||
subdivide_width = 0
|
|
||||||
subdivide_height = 0
|
|
||||||
subdivide_depth = 0
|
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=5]
|
[sub_resource type="CubeMesh" id=3]
|
||||||
|
|
||||||
material = SubResource( 3 )
|
material = SubResource( 1 )
|
||||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
|
||||||
size = Vector3( 1, 1, 1 )
|
size = Vector3( 1, 1, 1 )
|
||||||
subdivide_width = 0
|
|
||||||
subdivide_height = 0
|
|
||||||
subdivide_depth = 0
|
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=6]
|
[sub_resource type="DynamicFont" id=4]
|
||||||
|
|
||||||
size = 30
|
size = 50
|
||||||
use_mipmaps = true
|
font_data = ExtResource( 10 )
|
||||||
use_filter = false
|
|
||||||
font_data = ExtResource( 8 )
|
|
||||||
_sections_unfolded = [ "Font", "Settings" ]
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=7]
|
[sub_resource type="Animation" id=5]
|
||||||
|
|
||||||
resource_name = "Flash"
|
resource_name = "Flash"
|
||||||
length = 1.0
|
|
||||||
loop = false
|
|
||||||
step = 0.1
|
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/path = NodePath("Label:custom_fonts/font:size")
|
tracks/0/path = NodePath("Label:custom_fonts/font:size")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
@ -220,352 +81,205 @@ tracks/2/keys = {
|
|||||||
"values": [ Vector2( 0, 110 ), Vector2( 0, -50 ), Vector2( 0, -60 ), Vector2( 0, -100 ) ]
|
"values": [ Vector2( 0, 110 ), Vector2( 0, -50 ), Vector2( 0, -60 ), Vector2( 0, -100 ) ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=8]
|
[sub_resource type="DynamicFont" id=6]
|
||||||
|
|
||||||
size = 20
|
size = 20
|
||||||
use_mipmaps = false
|
|
||||||
use_filter = false
|
|
||||||
extra_spacing_bottom = 5
|
extra_spacing_bottom = 5
|
||||||
font_data = ExtResource( 12 )
|
font_data = ExtResource( 14 )
|
||||||
_sections_unfolded = [ "Extra Spacing", "Font", "Settings" ]
|
|
||||||
|
|
||||||
[node name="Main" type="WorldEnvironment"]
|
[node name="Main" type="WorldEnvironment"]
|
||||||
|
environment = ExtResource( 1 )
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
environment = SubResource( 2 )
|
[node name="Background" type="Sprite3D" parent="."]
|
||||||
script = ExtResource( 1 )
|
transform = Transform( 12.8, 0, 0, 0, 8.53, 0, 0, 0, 1, 4.5, 28.8, -34 )
|
||||||
|
|
||||||
[node name="Background" type="Sprite3D" parent="." index="0"]
|
|
||||||
|
|
||||||
transform = Transform( 12.8, 0, 0, 0, 8.53, 0, 0, 0, 1, 5, 10, -32 )
|
|
||||||
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
|
|
||||||
centered = true
|
|
||||||
offset = Vector2( 0, 0 )
|
|
||||||
flip_h = false
|
|
||||||
flip_v = false
|
|
||||||
modulate = Color( 0.334808, 0.343253, 0.359375, 0 )
|
modulate = Color( 0.334808, 0.343253, 0.359375, 0 )
|
||||||
opacity = 1.0
|
|
||||||
pixel_size = 0.01
|
|
||||||
axis = 2
|
|
||||||
transparent = false
|
transparent = false
|
||||||
shaded = true
|
|
||||||
double_sided = false
|
double_sided = false
|
||||||
alpha_cut = 0
|
texture = ExtResource( 3 )
|
||||||
texture = ExtResource( 2 )
|
|
||||||
vframes = 1
|
|
||||||
hframes = 1
|
|
||||||
frame = 0
|
|
||||||
region_enabled = false
|
|
||||||
region_rect = Rect2( 0, 0, 0, 0 )
|
|
||||||
_sections_unfolded = [ "Animation", "Flags", "Geometry", "Transform" ]
|
|
||||||
|
|
||||||
[node name="Camera" type="Camera" parent="." index="1"]
|
[node name="Camera" type="Camera" parent="."]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 0.939693, -0.34202, 0, 0.34202, 0.939693, 4.5, 2, 19 )
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 10, 20 )
|
|
||||||
keep_aspect = 1
|
|
||||||
cull_mask = 1048575
|
|
||||||
environment = null
|
|
||||||
h_offset = 0.0
|
|
||||||
v_offset = 0.0
|
|
||||||
doppler_tracking = 0
|
|
||||||
projection = 0
|
|
||||||
current = true
|
current = true
|
||||||
fov = 70.0
|
fov = 60.3
|
||||||
size = 1.0
|
|
||||||
near = 0.05
|
|
||||||
far = 500.0
|
far = 500.0
|
||||||
_sections_unfolded = [ "Transform" ]
|
|
||||||
|
|
||||||
[node name="DirectionalLight" type="DirectionalLight" parent="." index="2"]
|
|
||||||
|
|
||||||
|
[node name="DirectionalLight" type="DirectionalLight" parent="."]
|
||||||
transform = Transform( 0.332668, 0.771982, -0.541642, 0.579657, 0.285656, 0.763151, 0.743861, -0.567843, -0.352456, 5, 30, 0 )
|
transform = Transform( 0.332668, 0.771982, -0.541642, 0.579657, 0.285656, 0.763151, 0.743861, -0.567843, -0.352456, 5, 30, 0 )
|
||||||
layers = 1
|
|
||||||
light_color = Color( 1, 1, 1, 1 )
|
|
||||||
light_energy = 3.0
|
light_energy = 3.0
|
||||||
light_indirect_energy = 1.0
|
|
||||||
light_negative = false
|
|
||||||
light_specular = 0.5
|
|
||||||
light_bake_mode = 1
|
|
||||||
light_cull_mask = -1
|
|
||||||
shadow_enabled = false
|
|
||||||
shadow_color = Color( 0, 0, 0, 1 )
|
|
||||||
shadow_bias = 0.1
|
|
||||||
shadow_contact = 0.0
|
|
||||||
shadow_reverse_cull_face = false
|
|
||||||
editor_only = false
|
|
||||||
directional_shadow_mode = 2
|
|
||||||
directional_shadow_split_1 = 0.1
|
|
||||||
directional_shadow_split_2 = 0.2
|
|
||||||
directional_shadow_split_3 = 0.5
|
|
||||||
directional_shadow_blend_splits = false
|
|
||||||
directional_shadow_normal_bias = 0.8
|
|
||||||
directional_shadow_bias_split_scale = 0.25
|
|
||||||
directional_shadow_depth_range = 0
|
|
||||||
directional_shadow_max_distance = 200.0
|
|
||||||
_sections_unfolded = [ "Light", "Transform" ]
|
|
||||||
|
|
||||||
[node name="Matrix" type="MeshInstance" parent="." index="3"]
|
|
||||||
|
|
||||||
|
[node name="Matrix" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 10, 0, 0, 0, 20, 0, 0, 0, 1, 4.5, 9.5, 0 )
|
transform = Transform( 10, 0, 0, 0, 20, 0, 0, 0, 1, 4.5, 9.5, 0 )
|
||||||
visible = false
|
visible = false
|
||||||
layers = 1
|
mesh = SubResource( 2 )
|
||||||
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
|
|
||||||
mesh = SubResource( 4 )
|
|
||||||
skeleton = NodePath("..")
|
|
||||||
material/0 = null
|
material/0 = null
|
||||||
_sections_unfolded = [ "Transform" ]
|
|
||||||
|
|
||||||
[node name="GridMap" type="GridMap" parent="Matrix" index="0"]
|
|
||||||
|
|
||||||
|
[node name="GridMap" type="GridMap" parent="Matrix"]
|
||||||
transform = Transform( 0.1, 0, 0, 0, 0.05, 0, 0, 0, 1, -0.45, -0.475, 0 )
|
transform = Transform( 0.1, 0, 0, 0, 0.05, 0, 0, 0, 1, -0.45, -0.475, 0 )
|
||||||
theme = ExtResource( 3 )
|
mesh_library = ExtResource( 4 )
|
||||||
cell_size = Vector3( 1, 1, 1 )
|
cell_size = Vector3( 1, 1, 1 )
|
||||||
cell_octant_size = 8
|
|
||||||
cell_center_x = false
|
cell_center_x = false
|
||||||
cell_center_y = false
|
cell_center_y = false
|
||||||
cell_center_z = false
|
cell_center_z = false
|
||||||
cell_scale = 1.0
|
|
||||||
collision_layer = 1
|
|
||||||
collision_mask = 1
|
|
||||||
data = {
|
data = {
|
||||||
"cells": PoolIntArray( )
|
"cells": PoolIntArray( )
|
||||||
}
|
}
|
||||||
script = ExtResource( 4 )
|
script = ExtResource( 5 )
|
||||||
_sections_unfolded = [ "Cell", "Transform" ]
|
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_clip_": 1,
|
"_editor_clip_": 1,
|
||||||
"_editor_floor_": Vector3( 0, -1, 0 )
|
"_editor_floor_": Vector3( 0, -2, 0 )
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Position3D" type="Position3D" parent="Matrix" index="1"]
|
[node name="Position3D" type="Position3D" parent="Matrix"]
|
||||||
|
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 20, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 20, 0 )
|
||||||
_sections_unfolded = [ "Transform" ]
|
|
||||||
|
|
||||||
[node name="Hold" type="MeshInstance" parent="." index="4"]
|
[node name="DropTrail" type="Spatial" parent="Matrix"]
|
||||||
|
editor/display_folded = true
|
||||||
|
transform = Transform( 0.1, 0, 0, 0, 0.05, 0, 0, 0, 1, -0.45, -0.475, 0 )
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="0" type="Spatial" parent="Matrix/DropTrail"]
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/0"]
|
||||||
|
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
|
||||||
|
opacity = 0.1
|
||||||
|
texture = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="1" type="Spatial" parent="Matrix/DropTrail"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/1"]
|
||||||
|
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
|
||||||
|
opacity = 0.1
|
||||||
|
texture = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="2" type="Spatial" parent="Matrix/DropTrail"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/2"]
|
||||||
|
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
|
||||||
|
opacity = 0.1
|
||||||
|
texture = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="3" type="Spatial" parent="Matrix/DropTrail"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/3"]
|
||||||
|
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
|
||||||
|
opacity = 0.1
|
||||||
|
texture = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="Delay" type="Timer" parent="Matrix/DropTrail"]
|
||||||
|
wait_time = 0.06
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[node name="Hold" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 1, -5, 16, 0 )
|
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 1, -5, 16, 0 )
|
||||||
visible = false
|
visible = false
|
||||||
layers = 1
|
mesh = SubResource( 3 )
|
||||||
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
|
|
||||||
mesh = SubResource( 5 )
|
|
||||||
skeleton = NodePath("..")
|
|
||||||
material/0 = null
|
material/0 = null
|
||||||
_sections_unfolded = [ "Transform" ]
|
|
||||||
|
|
||||||
[node name="Position3D" type="Position3D" parent="Hold" index="0"]
|
|
||||||
|
|
||||||
|
[node name="Position3D" type="Position3D" parent="Hold"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 16, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 16, 0 )
|
||||||
_sections_unfolded = [ "Transform" ]
|
|
||||||
|
|
||||||
[node name="Next" type="MeshInstance" parent="." index="5"]
|
|
||||||
|
|
||||||
|
[node name="Next" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 1, 14, 16, 0 )
|
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 1, 14, 16, 0 )
|
||||||
visible = false
|
visible = false
|
||||||
layers = 1
|
mesh = SubResource( 3 )
|
||||||
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
|
|
||||||
mesh = SubResource( 5 )
|
|
||||||
skeleton = NodePath("..")
|
|
||||||
material/0 = null
|
material/0 = null
|
||||||
_sections_unfolded = [ "Transform" ]
|
|
||||||
|
|
||||||
[node name="Position3D" type="Position3D" parent="Next" index="0"]
|
|
||||||
|
|
||||||
|
[node name="Position3D" type="Position3D" parent="Next"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 13, 16, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 13, 16, 0 )
|
||||||
_sections_unfolded = [ "Transform" ]
|
|
||||||
|
|
||||||
[node name="DropTimer" type="Timer" parent="." index="6"]
|
[node name="DropTimer" type="Timer" parent="."]
|
||||||
|
|
||||||
process_mode = 1
|
[node name="LockDelay" type="Timer" parent="."]
|
||||||
wait_time = 1.0
|
|
||||||
one_shot = false
|
|
||||||
autostart = false
|
|
||||||
|
|
||||||
[node name="LockDelay" type="Timer" parent="." index="7"]
|
|
||||||
|
|
||||||
process_mode = 1
|
|
||||||
wait_time = 0.5
|
wait_time = 0.5
|
||||||
one_shot = true
|
one_shot = true
|
||||||
autostart = false
|
|
||||||
|
|
||||||
[node name="AutoShiftDelay" type="Timer" parent="." index="8"]
|
[node name="AutoShiftDelay" type="Timer" parent="."]
|
||||||
|
|
||||||
process_mode = 1
|
|
||||||
wait_time = 0.2
|
wait_time = 0.2
|
||||||
one_shot = true
|
one_shot = true
|
||||||
autostart = false
|
|
||||||
|
|
||||||
[node name="AutoShiftTimer" type="Timer" parent="." index="9"]
|
[node name="AutoShiftTimer" type="Timer" parent="."]
|
||||||
|
|
||||||
process_mode = 1
|
|
||||||
wait_time = 0.03
|
wait_time = 0.03
|
||||||
one_shot = false
|
|
||||||
autostart = false
|
|
||||||
|
|
||||||
[node name="MidiPlayer" parent="." index="10" instance=ExtResource( 5 )]
|
|
||||||
|
|
||||||
|
[node name="MidiPlayer" parent="." instance=ExtResource( 7 )]
|
||||||
editor/display_folded = true
|
editor/display_folded = true
|
||||||
script = ExtResource( 6 )
|
script = ExtResource( 8 )
|
||||||
file = "res://midi/Tetris - Song A.mid"
|
file = "res://midi/music-a-dance-remix-.mid"
|
||||||
volume_db = -24
|
volume_db = -24
|
||||||
loop = true
|
loop = true
|
||||||
loop_start = 1.81
|
|
||||||
soundfont = "res://midi/TimGM6mb.sf2"
|
soundfont = "res://midi/TimGM6mb.sf2"
|
||||||
|
|
||||||
[node name="LineCLearTimer" type="Timer" parent="MidiPlayer" index="1"]
|
[node name="LineCLearTimer" type="Timer" parent="MidiPlayer"]
|
||||||
|
|
||||||
process_mode = 1
|
|
||||||
wait_time = 1.41
|
wait_time = 1.41
|
||||||
one_shot = true
|
one_shot = true
|
||||||
autostart = false
|
|
||||||
|
|
||||||
[node name="FlashText" type="Control" parent="." index="11"]
|
|
||||||
|
|
||||||
|
[node name="FlashText" type="Control" parent="."]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
margin_left = -250.0
|
margin_left = -250.0
|
||||||
margin_top = -250.0
|
margin_top = -300.0
|
||||||
margin_right = 250.0
|
margin_right = 250.0
|
||||||
margin_bottom = 250.0
|
margin_bottom = 200.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
script = ExtResource( 9 )
|
||||||
rect_clip_content = false
|
|
||||||
mouse_filter = 0
|
|
||||||
mouse_default_cursor_shape = 0
|
|
||||||
size_flags_horizontal = 1
|
|
||||||
size_flags_vertical = 1
|
|
||||||
script = ExtResource( 7 )
|
|
||||||
_sections_unfolded = [ "Material", "Size Flags", "Theme" ]
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="FlashText" index="0"]
|
[node name="Label" type="Label" parent="FlashText"]
|
||||||
|
margin_top = -100.0
|
||||||
anchor_left = 0.0
|
|
||||||
anchor_top = 0.0
|
|
||||||
anchor_right = 0.0
|
|
||||||
anchor_bottom = 0.0
|
|
||||||
margin_top = 190.0
|
|
||||||
margin_right = 500.0
|
margin_right = 500.0
|
||||||
margin_bottom = 690.0
|
margin_bottom = 400.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
custom_fonts/font = SubResource( 4 )
|
||||||
rect_clip_content = false
|
|
||||||
mouse_filter = 2
|
|
||||||
mouse_default_cursor_shape = 0
|
|
||||||
size_flags_horizontal = 1
|
|
||||||
size_flags_vertical = 4
|
|
||||||
custom_fonts/font = SubResource( 6 )
|
|
||||||
custom_colors/font_color = Color( 0.445404, 0.710476, 0.820313, 0 )
|
custom_colors/font_color = Color( 0.445404, 0.710476, 0.820313, 0 )
|
||||||
align = 1
|
align = 1
|
||||||
valign = 1
|
valign = 1
|
||||||
percent_visible = 1.0
|
|
||||||
lines_skipped = 0
|
|
||||||
max_lines_visible = -1
|
|
||||||
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="FlashText" index="1"]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="FlashText"]
|
||||||
|
anims/Flash = SubResource( 5 )
|
||||||
root_node = NodePath("..")
|
|
||||||
autoplay = ""
|
|
||||||
playback_process_mode = 1
|
|
||||||
playback_default_blend_time = 0.0
|
|
||||||
playback_speed = 1.0
|
|
||||||
anims/Flash = SubResource( 7 )
|
|
||||||
blend_times = [ ]
|
|
||||||
_sections_unfolded = [ "Playback Options" ]
|
|
||||||
|
|
||||||
[node name="Stats" parent="." index="12" instance=ExtResource( 9 )]
|
|
||||||
|
|
||||||
|
[node name="Stats" parent="." instance=ExtResource( 11 )]
|
||||||
visible = false
|
visible = false
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
margin_left = 20.0
|
margin_left = 30.0
|
||||||
margin_top = -260.0
|
margin_top = -220.0
|
||||||
margin_right = 130.0
|
margin_right = 140.0
|
||||||
margin_bottom = -50.0
|
margin_bottom = -25.0
|
||||||
|
|
||||||
[node name="controls_ui" parent="." index="13" instance=ExtResource( 10 )]
|
|
||||||
|
|
||||||
|
[node name="controls_ui" parent="." instance=ExtResource( 12 )]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
[node name="Start" parent="." index="14" instance=ExtResource( 11 )]
|
[node name="Start" parent="." instance=ExtResource( 13 )]
|
||||||
|
|
||||||
[node name="ReplayButton" type="Button" parent="." index="15"]
|
|
||||||
|
|
||||||
|
[node name="ReplayButton" type="Button" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
margin_left = -335.0
|
margin_left = -170.0
|
||||||
margin_top = -55.0
|
margin_top = -90.0
|
||||||
margin_right = -165.0
|
margin_right = -45.0
|
||||||
margin_bottom = -15.0
|
margin_bottom = -50.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
custom_fonts/font = SubResource( 6 )
|
||||||
rect_clip_content = false
|
|
||||||
focus_mode = 2
|
|
||||||
mouse_filter = 0
|
|
||||||
mouse_default_cursor_shape = 0
|
|
||||||
size_flags_horizontal = 1
|
|
||||||
size_flags_vertical = 1
|
|
||||||
custom_fonts/font = SubResource( 8 )
|
|
||||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||||
toggle_mode = false
|
text = "play again"
|
||||||
enabled_focus_mode = 2
|
|
||||||
shortcut = null
|
|
||||||
group = null
|
|
||||||
text = "REPLAY"
|
|
||||||
flat = false
|
|
||||||
align = 1
|
|
||||||
_sections_unfolded = [ "Margin", "custom_colors", "custom_fonts" ]
|
|
||||||
|
|
||||||
|
[node name="Ghost" parent="." instance=ExtResource( 15 )]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[connection signal="timeout" from="Matrix/DropTrail/Delay" to="." method="_on_DropTrailDelay_timeout"]
|
||||||
[connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"]
|
[connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"]
|
||||||
|
|
||||||
[connection signal="timeout" from="LockDelay" to="." method="_on_LockDelay_timeout"]
|
[connection signal="timeout" from="LockDelay" to="." method="_on_LockDelay_timeout"]
|
||||||
|
|
||||||
[connection signal="timeout" from="AutoShiftDelay" to="." method="_on_AutoShiftDelay_timeout"]
|
[connection signal="timeout" from="AutoShiftDelay" to="." method="_on_AutoShiftDelay_timeout"]
|
||||||
|
|
||||||
[connection signal="timeout" from="AutoShiftTimer" to="." method="_on_AutoShiftTimer_timeout"]
|
[connection signal="timeout" from="AutoShiftTimer" to="." method="_on_AutoShiftTimer_timeout"]
|
||||||
|
|
||||||
[connection signal="timeout" from="MidiPlayer/LineCLearTimer" to="MidiPlayer" method="_on_LineCLearTimer_timeout"]
|
[connection signal="timeout" from="MidiPlayer/LineCLearTimer" to="MidiPlayer" method="_on_LineCLearTimer_timeout"]
|
||||||
|
|
||||||
[connection signal="animation_finished" from="FlashText/AnimationPlayer" to="FlashText" method="_on_AnimationPlayer_animation_finished"]
|
[connection signal="animation_finished" from="FlashText/AnimationPlayer" to="FlashText" method="_on_AnimationPlayer_animation_finished"]
|
||||||
|
|
||||||
[connection signal="flash_text" from="Stats" to="FlashText" method="print"]
|
[connection signal="flash_text" from="Stats" to="FlashText" method="print"]
|
||||||
|
|
||||||
[connection signal="level_up" from="Stats" to="." method="new_level"]
|
[connection signal="level_up" from="Stats" to="." method="new_level"]
|
||||||
|
|
||||||
[connection signal="start" from="Start" to="." method="new_game"]
|
[connection signal="start" from="Start" to="." method="new_game"]
|
||||||
|
|
||||||
[connection signal="pressed" from="ReplayButton" to="." method="_on_ReplayButton_pressed"]
|
[connection signal="pressed" from="ReplayButton" to="." method="_on_ReplayButton_pressed"]
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ extends "midi/MidiPlayer.gd"
|
|||||||
|
|
||||||
const Tetromino = preload("res://Tetrominos/Tetromino.gd")
|
const Tetromino = preload("res://Tetrominos/Tetromino.gd")
|
||||||
|
|
||||||
const LINE_CLEAR_CHANNELS = [2, 6]
|
const LINE_CLEAR_CHANNELS = [3]
|
||||||
|
|
||||||
var muted_events = []
|
var muted_events = []
|
||||||
|
|
||||||
|
@ -1,23 +1,32 @@
|
|||||||
[gd_scene load_steps=7 format=2]
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Start.gd" type="Script" id=1]
|
[ext_resource path="res://Start.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://fonts/TitleFont.tres" type="DynamicFont" id=2]
|
[ext_resource path="res://fonts/TitleFont.tres" type="DynamicFont" id=2]
|
||||||
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=3]
|
[ext_resource path="res://fonts/525-ROUN.TTF" type="DynamicFontData" id=3]
|
||||||
[ext_resource path="res://fonts/ButtonFont.tres" type="DynamicFont" id=4]
|
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=4]
|
||||||
|
[ext_resource path="res://fonts/ButtonFont.tres" type="DynamicFont" id=5]
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=1]
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
|
||||||
|
size = 50
|
||||||
|
use_mipmaps = false
|
||||||
|
use_filter = false
|
||||||
|
font_data = ExtResource( 3 )
|
||||||
|
_sections_unfolded = [ "Font", "Settings" ]
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=2]
|
||||||
|
|
||||||
size = 20
|
size = 20
|
||||||
use_mipmaps = false
|
use_mipmaps = false
|
||||||
use_filter = false
|
use_filter = false
|
||||||
font_data = ExtResource( 3 )
|
font_data = ExtResource( 4 )
|
||||||
_sections_unfolded = [ "Extra Spacing", "Font", "Font/fallback", "Settings" ]
|
_sections_unfolded = [ "Extra Spacing", "Font", "Font/fallback", "Settings" ]
|
||||||
|
|
||||||
[sub_resource type="Theme" id=2]
|
[sub_resource type="Theme" id=3]
|
||||||
|
|
||||||
default_font = SubResource( 1 )
|
default_font = SubResource( 2 )
|
||||||
|
|
||||||
[node name="Start" type="Control" index="0"]
|
[node name="Start" type="Control"]
|
||||||
|
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
@ -42,9 +51,9 @@ anchor_top = 0.0
|
|||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = -250.0
|
margin_left = -250.0
|
||||||
margin_top = -100.0
|
margin_top = -109.0
|
||||||
margin_right = 250.0
|
margin_right = 250.0
|
||||||
margin_bottom = -26.0
|
margin_bottom = -69.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
@ -54,31 +63,56 @@ size_flags_vertical = 4
|
|||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 2 )
|
||||||
custom_colors/font_color = Color( 0.443137, 0.709804, 0.819608, 0.533333 )
|
custom_colors/font_color = Color( 0.443137, 0.709804, 0.819608, 0.533333 )
|
||||||
custom_colors/font_color_shadow = Color( 1, 1, 1, 0.101333 )
|
custom_colors/font_color_shadow = Color( 1, 1, 1, 0.101333 )
|
||||||
text = "TETRIS
|
text = "TETRIS"
|
||||||
3000"
|
align = 1
|
||||||
|
percent_visible = 1.0
|
||||||
|
lines_skipped = 0
|
||||||
|
max_lines_visible = -1
|
||||||
|
_sections_unfolded = [ "Theme", "custom_colors", "custom_fonts" ]
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="." index="1"]
|
||||||
|
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_left = -250.0
|
||||||
|
margin_top = -75.0
|
||||||
|
margin_right = 250.0
|
||||||
|
margin_bottom = -19.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 2
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 4
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
custom_colors/font_color = Color( 0.443137, 0.709804, 0.819608, 0.533333 )
|
||||||
|
custom_colors/font_color_shadow = Color( 1, 1, 1, 0.101333 )
|
||||||
|
text = "3000"
|
||||||
align = 1
|
align = 1
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
lines_skipped = 0
|
lines_skipped = 0
|
||||||
max_lines_visible = -1
|
max_lines_visible = -1
|
||||||
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
|
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
|
||||||
|
|
||||||
[node name="SpinBox" type="SpinBox" parent="." index="1"]
|
[node name="SpinBox" type="SpinBox" parent="." index="2"]
|
||||||
|
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
margin_left = -83.0
|
margin_left = -83.0
|
||||||
margin_top = -20.0
|
margin_top = 40.0
|
||||||
margin_right = 113.0
|
margin_right = 113.0
|
||||||
margin_bottom = 17.0
|
margin_bottom = 77.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 1
|
size_flags_vertical = 1
|
||||||
theme = SubResource( 2 )
|
theme = SubResource( 3 )
|
||||||
min_value = 1.0
|
min_value = 1.0
|
||||||
max_value = 15.0
|
max_value = 15.0
|
||||||
step = 1.0
|
step = 1.0
|
||||||
@ -91,16 +125,16 @@ prefix = "Level "
|
|||||||
suffix = ""
|
suffix = ""
|
||||||
_sections_unfolded = [ "Margin", "Theme" ]
|
_sections_unfolded = [ "Margin", "Theme" ]
|
||||||
|
|
||||||
[node name="PlayButton" type="Button" parent="." index="2"]
|
[node name="PlayButton" type="Button" parent="." index="3"]
|
||||||
|
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
margin_left = -85.0
|
margin_left = -85.0
|
||||||
margin_top = 29.0
|
margin_top = 89.0
|
||||||
margin_right = 85.0
|
margin_right = 85.0
|
||||||
margin_bottom = 69.0
|
margin_bottom = 129.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
focus_mode = 2
|
focus_mode = 2
|
||||||
@ -108,7 +142,7 @@ mouse_filter = 0
|
|||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 1
|
size_flags_vertical = 1
|
||||||
custom_fonts/font = ExtResource( 4 )
|
custom_fonts/font = ExtResource( 5 )
|
||||||
toggle_mode = false
|
toggle_mode = false
|
||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
extends MarginContainer
|
extends MarginContainer
|
||||||
|
|
||||||
const SCORES = [
|
const SCORES = [
|
||||||
[0, 4, 1],
|
{"": 0, "MINI T-SPIN": 1, "T-SPIN": 4},
|
||||||
[1, 8, 2],
|
{"": 1, "MINI T-SPIN": 2, "T-SPIN": 8},
|
||||||
[3, 12],
|
{"": 3, "T-SPIN": 12},
|
||||||
[5, 16],
|
{"": 5, "T-SPIN": 16},
|
||||||
[8]
|
{"": 8}
|
||||||
]
|
]
|
||||||
const LINES_CLEARED_NAMES = ["", "SINGLE", "DOUBLE", "TRIPLE", "TETRIS"]
|
const LINES_CLEARED_NAMES = ["", "SINGLE", "DOUBLE", "TRIPLE", "TETRIS"]
|
||||||
const T_SPIN_NAMES = ["", "T-SPIN", "MINI T-SPIN"]
|
|
||||||
const password = "TETRIS 3000"
|
const password = "TETRIS 3000"
|
||||||
|
|
||||||
var level
|
var level
|
||||||
@ -18,8 +17,8 @@ var high_score
|
|||||||
var time
|
var time
|
||||||
var combos
|
var combos
|
||||||
|
|
||||||
signal flash_text(text)
|
|
||||||
signal level_up(level)
|
signal level_up(level)
|
||||||
|
signal flash_text(text)
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
load_user_data()
|
load_user_data()
|
||||||
@ -69,15 +68,15 @@ func piece_dropped(ds):
|
|||||||
func piece_locked(lines, t_spin):
|
func piece_locked(lines, t_spin):
|
||||||
var ds
|
var ds
|
||||||
if lines or t_spin:
|
if lines or t_spin:
|
||||||
var text = T_SPIN_NAMES[t_spin]
|
|
||||||
if lines and t_spin:
|
if lines and t_spin:
|
||||||
text += " "
|
emit_signal("flash_text", t_spin + " " + LINES_CLEARED_NAMES[lines])
|
||||||
text += LINES_CLEARED_NAMES[lines]
|
elif lines:
|
||||||
emit_signal("flash_text", text)
|
emit_signal("flash_text", LINES_CLEARED_NAMES[lines])
|
||||||
ds = SCORES[lines][t_spin]
|
elif t_spin:
|
||||||
goal -= ds
|
emit_signal("flash_text", t_spin)
|
||||||
|
goal -= SCORES[lines][""]
|
||||||
$VBC/Goal.text = str(goal)
|
$VBC/Goal.text = str(goal)
|
||||||
ds *= 100 * level
|
ds = 100 * level * SCORES[lines][t_spin]
|
||||||
emit_signal("flash_text", str(ds))
|
emit_signal("flash_text", str(ds))
|
||||||
score += ds
|
score += ds
|
||||||
$VBC/Score.text = str(score)
|
$VBC/Score.text = str(score)
|
||||||
|
@ -267,9 +267,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 153.0
|
margin_left = -116.0
|
||||||
margin_right = 78.0
|
margin_top = 205.0
|
||||||
margin_bottom = 170.0
|
margin_right = -38.0
|
||||||
|
margin_bottom = 222.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
247
source/Tetrominos/Ghost.tscn
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Tetrominos/TetroI.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[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.259529 )
|
||||||
|
metallic = 1.0
|
||||||
|
metallic_specular = 0.63
|
||||||
|
metallic_texture_channel = 4
|
||||||
|
roughness = 0.46
|
||||||
|
roughness_texture_channel = 0
|
||||||
|
emission_enabled = true
|
||||||
|
emission = Color( 0.446159, 0.591797, 0.540939, 1 )
|
||||||
|
emission_energy = 0.15
|
||||||
|
emission_operator = 0
|
||||||
|
emission_on_uv2 = 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="CubeMesh" id=2]
|
||||||
|
|
||||||
|
material = SubResource( 1 )
|
||||||
|
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="Ghost" type="Spatial"]
|
||||||
|
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Mino0" type="Spatial" parent="." index="0"]
|
||||||
|
|
||||||
|
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
|
||||||
|
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
|
||||||
|
|
||||||
|
[node name="MinoMesh" type="MeshInstance" parent="Mino0" index="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
|
||||||
|
mesh = SubResource( 2 )
|
||||||
|
skeleton = NodePath("..")
|
||||||
|
material/0 = null
|
||||||
|
_sections_unfolded = [ "Geometry", "Transform", "material" ]
|
||||||
|
|
||||||
|
[node name="OmniLight" type="OmniLight" parent="Mino0" index="1"]
|
||||||
|
|
||||||
|
layers = 1
|
||||||
|
light_color = Color( 1, 1, 1, 1 )
|
||||||
|
light_energy = 16.0
|
||||||
|
light_indirect_energy = 1.0
|
||||||
|
light_negative = false
|
||||||
|
light_specular = 0.5
|
||||||
|
light_bake_mode = 1
|
||||||
|
light_cull_mask = -1
|
||||||
|
shadow_enabled = false
|
||||||
|
shadow_color = Color( 0, 0, 0, 1 )
|
||||||
|
shadow_bias = 0.15
|
||||||
|
shadow_contact = 0.0
|
||||||
|
shadow_reverse_cull_face = false
|
||||||
|
editor_only = false
|
||||||
|
omni_range = 5.0
|
||||||
|
omni_attenuation = 1.0
|
||||||
|
omni_shadow_mode = 1
|
||||||
|
omni_shadow_detail = 1
|
||||||
|
_sections_unfolded = [ "Light" ]
|
||||||
|
|
||||||
|
[node name="Mino1" type="Spatial" parent="." index="1"]
|
||||||
|
|
||||||
|
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
|
||||||
|
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
|
||||||
|
|
||||||
|
[node name="MinoMesh" type="MeshInstance" parent="Mino1" index="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
|
||||||
|
mesh = SubResource( 2 )
|
||||||
|
skeleton = NodePath("..")
|
||||||
|
material/0 = null
|
||||||
|
_sections_unfolded = [ "Geometry", "Transform", "material" ]
|
||||||
|
|
||||||
|
[node name="OmniLight" type="OmniLight" parent="Mino1" index="1"]
|
||||||
|
|
||||||
|
layers = 1
|
||||||
|
light_color = Color( 1, 1, 1, 1 )
|
||||||
|
light_energy = 16.0
|
||||||
|
light_indirect_energy = 1.0
|
||||||
|
light_negative = false
|
||||||
|
light_specular = 0.5
|
||||||
|
light_bake_mode = 1
|
||||||
|
light_cull_mask = -1
|
||||||
|
shadow_enabled = false
|
||||||
|
shadow_color = Color( 0, 0, 0, 1 )
|
||||||
|
shadow_bias = 0.15
|
||||||
|
shadow_contact = 0.0
|
||||||
|
shadow_reverse_cull_face = false
|
||||||
|
editor_only = false
|
||||||
|
omni_range = 5.0
|
||||||
|
omni_attenuation = 1.0
|
||||||
|
omni_shadow_mode = 1
|
||||||
|
omni_shadow_detail = 1
|
||||||
|
_sections_unfolded = [ "Light" ]
|
||||||
|
|
||||||
|
[node name="Mino2" type="Spatial" parent="." index="2"]
|
||||||
|
|
||||||
|
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
|
||||||
|
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
|
||||||
|
|
||||||
|
[node name="MinoMesh" type="MeshInstance" parent="Mino2" index="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
|
||||||
|
mesh = SubResource( 2 )
|
||||||
|
skeleton = NodePath("..")
|
||||||
|
material/0 = null
|
||||||
|
_sections_unfolded = [ "Geometry", "Transform", "material" ]
|
||||||
|
|
||||||
|
[node name="OmniLight" type="OmniLight" parent="Mino2" index="1"]
|
||||||
|
|
||||||
|
layers = 1
|
||||||
|
light_color = Color( 1, 1, 1, 1 )
|
||||||
|
light_energy = 16.0
|
||||||
|
light_indirect_energy = 1.0
|
||||||
|
light_negative = false
|
||||||
|
light_specular = 0.5
|
||||||
|
light_bake_mode = 1
|
||||||
|
light_cull_mask = -1
|
||||||
|
shadow_enabled = false
|
||||||
|
shadow_color = Color( 0, 0, 0, 1 )
|
||||||
|
shadow_bias = 0.15
|
||||||
|
shadow_contact = 0.0
|
||||||
|
shadow_reverse_cull_face = false
|
||||||
|
editor_only = false
|
||||||
|
omni_range = 5.0
|
||||||
|
omni_attenuation = 1.0
|
||||||
|
omni_shadow_mode = 1
|
||||||
|
omni_shadow_detail = 1
|
||||||
|
_sections_unfolded = [ "Light" ]
|
||||||
|
|
||||||
|
[node name="Mino3" type="Spatial" parent="." index="3"]
|
||||||
|
|
||||||
|
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
|
||||||
|
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
|
||||||
|
|
||||||
|
[node name="MinoMesh" type="MeshInstance" parent="Mino3" index="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
|
||||||
|
mesh = SubResource( 2 )
|
||||||
|
skeleton = NodePath("..")
|
||||||
|
material/0 = null
|
||||||
|
_sections_unfolded = [ "Geometry", "Transform", "material" ]
|
||||||
|
|
||||||
|
[node name="OmniLight" type="OmniLight" parent="Mino3" index="1"]
|
||||||
|
|
||||||
|
layers = 1
|
||||||
|
light_color = Color( 1, 1, 1, 1 )
|
||||||
|
light_energy = 16.0
|
||||||
|
light_indirect_energy = 1.0
|
||||||
|
light_negative = false
|
||||||
|
light_specular = 0.5
|
||||||
|
light_bake_mode = 1
|
||||||
|
light_cull_mask = -1
|
||||||
|
shadow_enabled = false
|
||||||
|
shadow_color = Color( 0, 0, 0, 1 )
|
||||||
|
shadow_bias = 0.15
|
||||||
|
shadow_contact = 0.0
|
||||||
|
shadow_reverse_cull_face = false
|
||||||
|
editor_only = false
|
||||||
|
omni_range = 5.0
|
||||||
|
omni_attenuation = 1.0
|
||||||
|
omni_shadow_mode = 1
|
||||||
|
omni_shadow_detail = 1
|
||||||
|
_sections_unfolded = [ "Light" ]
|
||||||
|
|
||||||
|
|
@ -30,16 +30,16 @@ render_priority = 0
|
|||||||
trail_divisor = 2
|
trail_divisor = 2
|
||||||
trail_color_modifier = SubResource( 4 )
|
trail_color_modifier = SubResource( 4 )
|
||||||
emission_shape = 2
|
emission_shape = 2
|
||||||
emission_box_extents = Vector3( 10, 1, 1 )
|
emission_box_extents = Vector3( 1, 1, 1 )
|
||||||
flag_align_y = false
|
flag_align_y = false
|
||||||
flag_rotate_y = true
|
flag_rotate_y = true
|
||||||
flag_disable_z = false
|
flag_disable_z = false
|
||||||
spread = 0.0
|
spread = 0.0
|
||||||
flatness = 0.0
|
flatness = 0.0
|
||||||
gravity = Vector3( 0, -10, 30 )
|
gravity = Vector3( 0, -40, 0 )
|
||||||
initial_velocity = 20.0
|
initial_velocity = 100.0
|
||||||
initial_velocity_random = 1.0
|
initial_velocity_random = 1.0
|
||||||
angular_velocity = 97.14
|
angular_velocity = 210.0
|
||||||
angular_velocity_random = 1.0
|
angular_velocity_random = 1.0
|
||||||
linear_accel = 100.0
|
linear_accel = 100.0
|
||||||
linear_accel_random = 1.0
|
linear_accel_random = 1.0
|
||||||
@ -61,9 +61,9 @@ anim_speed_random = 0.0
|
|||||||
anim_offset = 0.0
|
anim_offset = 0.0
|
||||||
anim_offset_random = 0.0
|
anim_offset_random = 0.0
|
||||||
anim_loop = false
|
anim_loop = false
|
||||||
_sections_unfolded = [ "Angular Velocity", "Color", "Gravity", "Initial Velocity", "Linear Accel", "Scale", "Spread" ]
|
_sections_unfolded = [ "Angular Velocity", "Color", "Emission Shape", "Gravity", "Initial Velocity", "Linear Accel", "Scale", "Spread" ]
|
||||||
|
|
||||||
[node name="ExplodingLine" type="Particles" index="0"]
|
[node name="ExplodingMino" type="Particles"]
|
||||||
|
|
||||||
layers = 1
|
layers = 1
|
||||||
material_override = null
|
material_override = null
|
||||||
@ -75,7 +75,7 @@ lod_min_hysteresis = 0.0
|
|||||||
lod_max_distance = 0.0
|
lod_max_distance = 0.0
|
||||||
lod_max_hysteresis = 0.0
|
lod_max_hysteresis = 0.0
|
||||||
emitting = false
|
emitting = false
|
||||||
amount = 40
|
amount = 1
|
||||||
lifetime = 2.0
|
lifetime = 2.0
|
||||||
one_shot = true
|
one_shot = true
|
||||||
preprocess = 0.0
|
preprocess = 0.0
|
||||||
@ -84,7 +84,7 @@ explosiveness = 1.0
|
|||||||
randomness = 0.0
|
randomness = 0.0
|
||||||
fixed_fps = 0
|
fixed_fps = 0
|
||||||
fract_delta = true
|
fract_delta = true
|
||||||
visibility_aabb = AABB( -5, -0.5, -1, 10, 1, 2 )
|
visibility_aabb = AABB( -0.5, -0.5, -0.5, 1, 1, 1 )
|
||||||
local_coords = false
|
local_coords = false
|
||||||
draw_order = 0
|
draw_order = 0
|
||||||
process_material = SubResource( 5 )
|
process_material = SubResource( 5 )
|
@ -1,228 +1,41 @@
|
|||||||
[gd_scene load_steps=8 format=2]
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Tetrominos/Mino/MinoMesh.tscn" type="PackedScene" id=1]
|
[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/MinoMesh.tres" type="CubeMesh" id=2]
|
||||||
|
|
||||||
[sub_resource type="SpatialMaterial" id=1]
|
[sub_resource type="CubeMesh" 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 )
|
size = Vector3( 0.9, 0.9, 0.9 )
|
||||||
subdivide_width = 0
|
|
||||||
subdivide_height = 0
|
[sub_resource type="SpatialMaterial" id=2]
|
||||||
subdivide_depth = 0
|
|
||||||
|
flags_transparent = true
|
||||||
|
params_blend_mode = 1
|
||||||
|
albedo_color = Color( 0.601563, 0.775878, 1, 0.259529 )
|
||||||
|
metallic = 1.0
|
||||||
|
metallic_specular = 0.63
|
||||||
|
metallic_texture_channel = 4
|
||||||
|
roughness = 0.46
|
||||||
|
emission_enabled = true
|
||||||
|
emission = Color( 0.755859, 1, 0.914169, 1 )
|
||||||
|
emission_energy = 1.0
|
||||||
|
emission_operator = 0
|
||||||
|
emission_on_uv2 = false
|
||||||
|
proximity_fade_enable = true
|
||||||
|
proximity_fade_distance = 1.0
|
||||||
|
|
||||||
[node name="Mino" type="Spatial"]
|
[node name="Mino" type="Spatial"]
|
||||||
|
|
||||||
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
|
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
|
||||||
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
|
|
||||||
|
|
||||||
[node name="MinoMesh" parent="." index="0" instance=ExtResource( 1 )]
|
|
||||||
|
|
||||||
|
[node name="MinoMesh" parent="." instance=ExtResource( 1 )]
|
||||||
mesh = ExtResource( 2 )
|
mesh = ExtResource( 2 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
_sections_unfolded = [ "Geometry", "Transform", "material" ]
|
|
||||||
|
|
||||||
[node name="Trail" type="Particles" parent="." index="1"]
|
[node name="LockingMesh" type="MeshInstance" parent="."]
|
||||||
|
visible = false
|
||||||
|
mesh = SubResource( 1 )
|
||||||
|
material/0 = SubResource( 2 )
|
||||||
|
|
||||||
layers = 1
|
[node name="OmniLight" type="OmniLight" parent="LockingMesh"]
|
||||||
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.05
|
|
||||||
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"]
|
|
||||||
|
|
||||||
transform = Transform( 1, 0, 0, 0, -4.37114e-008, 1, 0, -1, -4.37114e-008, 0, 0, 0.5 )
|
|
||||||
layers = 1
|
|
||||||
light_color = Color( 1, 1, 1, 1 )
|
|
||||||
light_energy = 16.0
|
light_energy = 16.0
|
||||||
light_indirect_energy = 1.0
|
|
||||||
light_negative = false
|
|
||||||
light_specular = 0.5
|
|
||||||
light_bake_mode = 1
|
|
||||||
light_cull_mask = -1
|
|
||||||
shadow_enabled = false
|
|
||||||
shadow_color = Color( 0, 0, 0, 1 )
|
|
||||||
shadow_bias = 0.15
|
|
||||||
shadow_contact = 0.0
|
|
||||||
shadow_reverse_cull_face = false
|
|
||||||
editor_only = false
|
|
||||||
spot_range = 20.0
|
|
||||||
spot_attenuation = 0.5
|
|
||||||
spot_angle = 5.0
|
|
||||||
spot_angle_attenuation = 2.0
|
|
||||||
_sections_unfolded = [ "Light", "Spot", "Transform" ]
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,58 +2,18 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
|
||||||
render_priority = 0
|
|
||||||
flags_transparent = true
|
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_blend_mode = 1
|
||||||
params_cull_mode = 0
|
albedo_color = Color( 0.6, 0.803922, 1, 0.521569 )
|
||||||
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.486471 )
|
|
||||||
metallic = 1.0
|
metallic = 1.0
|
||||||
metallic_specular = 0.63
|
metallic_specular = 0.63
|
||||||
metallic_texture_channel = 4
|
metallic_texture_channel = 4
|
||||||
roughness = 0.46
|
roughness = 0.46
|
||||||
roughness_texture_channel = 0
|
|
||||||
emission_enabled = true
|
emission_enabled = true
|
||||||
emission = Color( 0.755859, 1, 0.914169, 1 )
|
emission = Color( 0.854902, 1, 0.992157, 1 )
|
||||||
emission_energy = 0.2
|
emission_energy = 0.17
|
||||||
emission_operator = 0
|
emission_operator = 0
|
||||||
emission_on_uv2 = false
|
emission_on_uv2 = 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_enable = true
|
||||||
proximity_fade_distance = 1.0
|
proximity_fade_distance = 1.0
|
||||||
distance_fade_enable = false
|
|
||||||
_sections_unfolded = [ "Albedo", "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
|
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
[ext_resource path="res://Tetrominos/Mino/MinoMaterial.tres" type="Material" id=1]
|
[ext_resource path="res://Tetrominos/Mino/MinoMaterial.tres" type="Material" id=1]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=1]
|
[sub_resource type="CubeMesh" id=1]
|
||||||
|
|
||||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||||
@ -12,7 +10,7 @@ subdivide_width = 0
|
|||||||
subdivide_height = 0
|
subdivide_height = 0
|
||||||
subdivide_depth = 0
|
subdivide_depth = 0
|
||||||
|
|
||||||
[node name="Mino" type="MeshInstance" index="0"]
|
[node name="Mino" type="MeshInstance"]
|
||||||
|
|
||||||
layers = 1
|
layers = 1
|
||||||
material_override = null
|
material_override = null
|
||||||
|
BIN
source/Tetrominos/Mino/drop_trail.png
Normal file
After Width: | Height: | Size: 11 KiB |
@ -1,70 +1,69 @@
|
|||||||
extends "Tetromino.gd"
|
extends "Tetromino.gd"
|
||||||
|
|
||||||
const CLOCKWISE = -1
|
func _init():
|
||||||
const COUNTERCLOCKWISE = 1
|
super_rotation_system = [
|
||||||
const SUPER_ROTATION_SYSTEM = [
|
{
|
||||||
{
|
COUNTERCLOCKWISE: [
|
||||||
COUNTERCLOCKWISE: [
|
Vector3(0, -1, 0),
|
||||||
Vector3(0, -1, 0),
|
Vector3(-1, -1, 0),
|
||||||
Vector3(-1, -1, 0),
|
Vector3(2, -1, 0),
|
||||||
Vector3(2, -1, 0),
|
Vector3(-1, 1, 0),
|
||||||
Vector3(-1, 1, 0),
|
Vector3(2, -2, 0)
|
||||||
Vector3(2, -2, 0)
|
],
|
||||||
],
|
CLOCKWISE: [
|
||||||
CLOCKWISE: [
|
Vector3(1, 0, 0),
|
||||||
Vector3(1, 0, 0),
|
Vector3(-1, 0, 0),
|
||||||
Vector3(-1, 0, 0),
|
Vector3(2, 0, 0),
|
||||||
Vector3(2, 0, 0),
|
Vector3(-1, -1, 0),
|
||||||
Vector3(-1, -1, 0),
|
Vector3(2, 2, 0)
|
||||||
Vector3(2, 2, 0)
|
],
|
||||||
],
|
},
|
||||||
},
|
{
|
||||||
{
|
COUNTERCLOCKWISE: [
|
||||||
COUNTERCLOCKWISE: [
|
Vector3(-1, 0, 0),
|
||||||
Vector3(-1, 0, 0),
|
Vector3(1, 0, 0),
|
||||||
Vector3(1, 0, 0),
|
Vector3(-2, 0, 0),
|
||||||
Vector3(-2, 0, 0),
|
Vector3(1, 1, 0),
|
||||||
Vector3(1, 1, 0),
|
Vector3(-2, -2, 0)
|
||||||
Vector3(-2, -2, 0)
|
],
|
||||||
],
|
CLOCKWISE: [
|
||||||
CLOCKWISE: [
|
Vector3(0, -1, 0),
|
||||||
Vector3(0, -1, 0),
|
Vector3(-1, -1, 0),
|
||||||
Vector3(-1, -1, 0),
|
Vector3(2, -1, 0),
|
||||||
Vector3(2, -1, 0),
|
Vector3(-1, 1, 0),
|
||||||
Vector3(-1, 1, 0),
|
Vector3(2, -2, 0)
|
||||||
Vector3(2, -2, 0)
|
],
|
||||||
],
|
},
|
||||||
},
|
{
|
||||||
{
|
COUNTERCLOCKWISE: [
|
||||||
COUNTERCLOCKWISE: [
|
Vector3(0, 1, 0),
|
||||||
Vector3(0, 1, 0),
|
Vector3(1, 1, 0),
|
||||||
Vector3(1, 1, 0),
|
Vector3(-2, 1, 0),
|
||||||
Vector3(-2, 1, 0),
|
Vector3(1, -1, 0),
|
||||||
Vector3(1, -1, 0),
|
Vector3(-2, 2, 0)
|
||||||
Vector3(-2, 2, 0)
|
],
|
||||||
],
|
CLOCKWISE: [
|
||||||
CLOCKWISE: [
|
Vector3(-1, 0, 0),
|
||||||
Vector3(-1, 0, 0),
|
Vector3(1, 0, 0),
|
||||||
Vector3(1, 0, 0),
|
Vector3(-2, 0, 0),
|
||||||
Vector3(-2, 0, 0),
|
Vector3(1, 1, 0),
|
||||||
Vector3(1, 1, 0),
|
Vector3(-2, -2, 0)
|
||||||
Vector3(-2, -2, 0)
|
],
|
||||||
],
|
},
|
||||||
},
|
{
|
||||||
{
|
COUNTERCLOCKWISE: [
|
||||||
COUNTERCLOCKWISE: [
|
Vector3(1, 0, 0),
|
||||||
Vector3(1, 0, 0),
|
Vector3(-1, 0, 0),
|
||||||
Vector3(-1, 0, 0),
|
Vector3(2, 0, 0),
|
||||||
Vector3(2, 0, 0),
|
Vector3(-1, -1, 0),
|
||||||
Vector3(-1, -1, 0),
|
Vector3(2, 2, 0)
|
||||||
Vector3(2, 2, 0)
|
],
|
||||||
],
|
CLOCKWISE: [
|
||||||
CLOCKWISE: [
|
Vector3(0, 1, 0),
|
||||||
Vector3(0, 1, 0),
|
Vector3(1, 1, 0),
|
||||||
Vector3(1, 1, 0),
|
Vector3(-2, 1, 0),
|
||||||
Vector3(-2, 1, 0),
|
Vector3(1, -1, 0),
|
||||||
Vector3(1, -1, 0),
|
Vector3(-2, 2, 0)
|
||||||
Vector3(-2, 2, 0)
|
],
|
||||||
],
|
},
|
||||||
},
|
]
|
||||||
]
|
|
@ -3,7 +3,7 @@
|
|||||||
[ext_resource path="res://Tetrominos/Tetromino.gd" type="Script" id=1]
|
[ext_resource path="res://Tetrominos/Tetromino.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Tetrominos/Mino/Mino.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Tetrominos/Mino/Mino.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
[node name="TetroJ" type="Spatial" index="0"]
|
[node name="TetroJ" type="Spatial"]
|
||||||
|
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
extends "Tetromino.gd"
|
extends "Tetromino.gd"
|
||||||
|
|
||||||
func rotate(direction):
|
func turn(direction):
|
||||||
return 0
|
return false
|
||||||
|
|
@ -3,8 +3,7 @@
|
|||||||
[ext_resource path="res://Tetrominos/TetroO.gd" type="Script" id=1]
|
[ext_resource path="res://Tetrominos/TetroO.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Tetrominos/Mino/Mino.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Tetrominos/Mino/Mino.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
|
[node name="TetroO" type="Spatial"]
|
||||||
[node name="TetroO" type="Spatial" index="0"]
|
|
||||||
|
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
@ -6,20 +6,16 @@ const T_SLOT = [
|
|||||||
Vector3(1, -1, 0),
|
Vector3(1, -1, 0),
|
||||||
Vector3(-1, -1, 0)
|
Vector3(-1, -1, 0)
|
||||||
]
|
]
|
||||||
|
|
||||||
func rotate(direction):
|
func t_spin():
|
||||||
var rotation_point = .rotate(direction)
|
if rotated_last:
|
||||||
if rotation_point and t_spin != T_SPIN:
|
|
||||||
var center = to_global(minoes[0].translation)
|
var center = to_global(minoes[0].translation)
|
||||||
var a = not grid_map.is_free_cell(center + T_SLOT[orientation])
|
var a = not grid_map.is_free_cell(center + T_SLOT[orientation])
|
||||||
var b = not grid_map.is_free_cell(center + T_SLOT[(1+orientation)%4])
|
var b = not grid_map.is_free_cell(center + T_SLOT[(1+orientation)%4])
|
||||||
var c = not grid_map.is_free_cell(center + T_SLOT[(2+orientation)%4])
|
var c = not grid_map.is_free_cell(center + T_SLOT[(3+orientation)%4])
|
||||||
var d = not grid_map.is_free_cell(center + T_SLOT[(3+orientation)%4])
|
var d = not grid_map.is_free_cell(center + T_SLOT[(2+orientation)%4])
|
||||||
if a and b and (c or d):
|
if rotation_point_5_used or (a and b and (c or d)):
|
||||||
t_spin = T_SPIN
|
return "T-SPIN"
|
||||||
elif c and d and (a or b):
|
elif c and d and (a or b):
|
||||||
if rotation_point == 5:
|
return "MINI T-SPIN"
|
||||||
t_spin = T_SPIN
|
return ""
|
||||||
else:
|
|
||||||
t_spin = MINI_T_SPIN
|
|
||||||
return rotation_point
|
|
@ -6,6 +6,7 @@
|
|||||||
[node name="TetroT" type="Spatial"]
|
[node name="TetroT" type="Spatial"]
|
||||||
|
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
_sections_unfolded = [ "Transform" ]
|
||||||
|
|
||||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||||
|
|
||||||
|
@ -3,10 +3,9 @@ extends Spatial
|
|||||||
const NB_MINOES = 4
|
const NB_MINOES = 4
|
||||||
const CLOCKWISE = -1
|
const CLOCKWISE = -1
|
||||||
const COUNTERCLOCKWISE = 1
|
const COUNTERCLOCKWISE = 1
|
||||||
const NO_T_SPIN = 0
|
const DROP_MOVEMENT = Vector3(0, -1, 0)
|
||||||
const T_SPIN = 1
|
|
||||||
const MINI_T_SPIN = 2
|
var super_rotation_system = [
|
||||||
const SUPER_ROTATION_SYSTEM = [
|
|
||||||
{
|
{
|
||||||
COUNTERCLOCKWISE: [
|
COUNTERCLOCKWISE: [
|
||||||
Vector3(0, 0, 0),
|
Vector3(0, 0, 0),
|
||||||
@ -74,17 +73,19 @@ const SUPER_ROTATION_SYSTEM = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
var minoes = []
|
var minoes = []
|
||||||
|
var orientation = 0
|
||||||
|
var rotation_point_5_used = false
|
||||||
|
var rotated_last = false
|
||||||
var grid_map
|
var grid_map
|
||||||
var lock_delay
|
var lock_delay
|
||||||
var orientation = 0
|
var ghost
|
||||||
var t_spin = NO_T_SPIN
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
randomize()
|
|
||||||
for i in range(NB_MINOES):
|
for i in range(NB_MINOES):
|
||||||
minoes.append(get_node("Mino"+str(i)))
|
minoes.append(get_node("Mino"+str(i)))
|
||||||
grid_map = get_node("../Matrix/GridMap")
|
grid_map = get_node("../Matrix/GridMap")
|
||||||
lock_delay = get_node("../LockDelay")
|
lock_delay = get_node("../LockDelay")
|
||||||
|
ghost = get_node("../Ghost")
|
||||||
|
|
||||||
func set_translations(translations):
|
func set_translations(translations):
|
||||||
for i in range(NB_MINOES):
|
for i in range(NB_MINOES):
|
||||||
@ -99,34 +100,52 @@ func get_translations():
|
|||||||
func move(movement):
|
func move(movement):
|
||||||
if grid_map.possible_positions(get_translations(), movement):
|
if grid_map.possible_positions(get_translations(), movement):
|
||||||
translate(movement)
|
translate(movement)
|
||||||
lock_delay.start()
|
unlocking()
|
||||||
|
rotated_last = false
|
||||||
|
move_ghost()
|
||||||
return true
|
return true
|
||||||
return false
|
else:
|
||||||
|
if movement == DROP_MOVEMENT:
|
||||||
|
locking()
|
||||||
|
return false
|
||||||
|
|
||||||
func rotate(direction):
|
func turn(direction):
|
||||||
var t = get_translations()
|
var translations = get_translations()
|
||||||
var rotated_translations = [t[0]]
|
var rotated_translations = [translations[0]]
|
||||||
|
var center = translations[0]
|
||||||
for i in range(1, NB_MINOES):
|
for i in range(1, NB_MINOES):
|
||||||
var v = t[i]
|
var rt = translations[i] - center
|
||||||
v -= t[0]
|
rt = Vector3(-1*direction*rt.y, direction*rt.x, 0)
|
||||||
v = Vector3(-1*direction*v.y, direction*v.x, 0)
|
rt += center
|
||||||
v += t[0]
|
rotated_translations.append(rt)
|
||||||
rotated_translations.append(v)
|
var movements = super_rotation_system[orientation][direction]
|
||||||
var movements = SUPER_ROTATION_SYSTEM[orientation][direction]
|
|
||||||
for i in range(movements.size()):
|
for i in range(movements.size()):
|
||||||
if grid_map.possible_positions(rotated_translations, movements[i]):
|
if grid_map.possible_positions(rotated_translations, movements[i]):
|
||||||
orientation -= direction
|
orientation = (orientation - direction) % NB_MINOES
|
||||||
orientation %= NB_MINOES
|
|
||||||
set_translations(rotated_translations)
|
set_translations(rotated_translations)
|
||||||
translate(movements[i])
|
translate(movements[i])
|
||||||
lock_delay.start()
|
unlocking()
|
||||||
return i+1
|
rotated_last = true
|
||||||
return 0
|
if i == 4:
|
||||||
|
rotation_point_5_used = true
|
||||||
|
move_ghost()
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
func emit_trail(visible):
|
func move_ghost():
|
||||||
var trail
|
ghost.set_translations(get_translations())
|
||||||
|
while grid_map.possible_positions(ghost.get_translations(), DROP_MOVEMENT):
|
||||||
|
ghost.translate(DROP_MOVEMENT)
|
||||||
|
|
||||||
|
func t_spin():
|
||||||
|
return ""
|
||||||
|
|
||||||
|
func locking():
|
||||||
|
if lock_delay.is_stopped():
|
||||||
|
lock_delay.start()
|
||||||
for mino in minoes:
|
for mino in minoes:
|
||||||
trail = mino.get_node("Trail")
|
mino.get_node("LockingMesh").visible = true
|
||||||
trail.emitting = visible
|
|
||||||
trail.visible = visible
|
func unlocking():
|
||||||
mino.get_node("SpotLight").visible = visible
|
if not lock_delay.is_stopped():
|
||||||
|
lock_delay.start()
|
@ -1,17 +1,5 @@
|
|||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
# Note for the reader:
|
|
||||||
#
|
|
||||||
# This demo conveniently uses the same names for actions and for the container nodes
|
|
||||||
# that hold each remapping button. This allow to get back to the button based simply
|
|
||||||
# on the name of the corresponding action, but it might not be so simple in your project.
|
|
||||||
#
|
|
||||||
# A better approach for large-scale input remapping might be to do the connections between
|
|
||||||
# buttons and wait_for_input through the code, passing as arguments both the name of the
|
|
||||||
# action and the node, e.g.:
|
|
||||||
# button.connect("pressed", self, "wait_for_input", [ button, action ])
|
|
||||||
|
|
||||||
# Constants
|
|
||||||
const INPUT_ACTIONS = [
|
const INPUT_ACTIONS = [
|
||||||
"move_left",
|
"move_left",
|
||||||
"move_right",
|
"move_right",
|
||||||
@ -24,11 +12,8 @@ const INPUT_ACTIONS = [
|
|||||||
]
|
]
|
||||||
const CONFIG_FILE = "user://input.cfg"
|
const CONFIG_FILE = "user://input.cfg"
|
||||||
|
|
||||||
# Member variables
|
|
||||||
var action # To register the action the UI is currently handling
|
var action # To register the action the UI is currently handling
|
||||||
var button # Button node corresponding to the above action
|
var button # Button node corresponding to the above action
|
||||||
var enable_resume = true
|
|
||||||
|
|
||||||
|
|
||||||
# Load/save input mapping to a config file
|
# Load/save input mapping to a config file
|
||||||
# Changes done while testing the demo will be persistent, saved to CONFIG_FILE
|
# Changes done while testing the demo will be persistent, saved to CONFIG_FILE
|
||||||
@ -74,8 +59,7 @@ func wait_for_input(action_bind):
|
|||||||
action = action_bind
|
action = action_bind
|
||||||
# See note at the beginning of the script
|
# See note at the beginning of the script
|
||||||
button = get_node("bindings").get_node(action).get_node("Button")
|
button = get_node("bindings").get_node(action).get_node("Button")
|
||||||
#get_node("contextual_help").text = "Press a key to assign to the '" + action + "' action."
|
button.text = "Press key"
|
||||||
enable_resume = false
|
|
||||||
set_process_input(true)
|
set_process_input(true)
|
||||||
|
|
||||||
|
|
||||||
@ -85,9 +69,7 @@ func _input(event):
|
|||||||
# Register the event as handled and stop polling
|
# Register the event as handled and stop polling
|
||||||
get_tree().set_input_as_handled()
|
get_tree().set_input_as_handled()
|
||||||
set_process_input(false)
|
set_process_input(false)
|
||||||
# Reinitialise the contextual help label
|
|
||||||
#get_node("contextual_help").text = "Click a key binding to reassign it, or press the Cancel action."
|
|
||||||
|
|
||||||
# Display the string corresponding to the pressed key
|
# Display the string corresponding to the pressed key
|
||||||
var scancode = OS.get_scancode_string(event.scancode)
|
var scancode = OS.get_scancode_string(event.scancode)
|
||||||
button.text = scancode
|
button.text = scancode
|
||||||
@ -97,9 +79,8 @@ func _input(event):
|
|||||||
# Add the new key binding
|
# Add the new key binding
|
||||||
InputMap.action_add_event(action, event)
|
InputMap.action_add_event(action, event)
|
||||||
save_to_config("input", action, scancode)
|
save_to_config("input", action, scancode)
|
||||||
enable_resume = true
|
hint_text()
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
# Load config if existing, if not it will be generated with default values
|
# Load config if existing, if not it will be generated with default values
|
||||||
load_config()
|
load_config()
|
||||||
@ -111,6 +92,13 @@ func _ready():
|
|||||||
var button = get_node("bindings").get_node(action).get_node("Button")
|
var button = get_node("bindings").get_node(action).get_node("Button")
|
||||||
button.text = OS.get_scancode_string(input_event.scancode)
|
button.text = OS.get_scancode_string(input_event.scancode)
|
||||||
button.connect("pressed", self, "wait_for_input", [action])
|
button.connect("pressed", self, "wait_for_input", [action])
|
||||||
|
|
||||||
|
hint_text()
|
||||||
|
|
||||||
|
func hint_text():
|
||||||
|
var input_event = InputMap.get_action_list("pause")[0]
|
||||||
|
var scancode = OS.get_scancode_string(input_event.scancode)
|
||||||
|
$hint.text = "Press ["+ scancode + "] to resume\nor click on a button to change key assignment"
|
||||||
|
|
||||||
# Do not start processing input until a button is pressed
|
# Do not start processing input until a button is pressed
|
||||||
set_process_input(false)
|
set_process_input(false)
|
||||||
|
@ -19,9 +19,9 @@ anchor_top = 0.5
|
|||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
margin_left = -30.0
|
margin_left = -30.0
|
||||||
margin_top = 10.0
|
margin_top = 20.0
|
||||||
margin_right = 10.0
|
margin_right = 10.0
|
||||||
margin_bottom = 50.0
|
margin_bottom = 60.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -39,10 +39,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = -40.0
|
margin_left = -220.0
|
||||||
margin_top = -150.0
|
margin_top = -190.0
|
||||||
margin_right = 110.0
|
margin_right = 280.0
|
||||||
margin_bottom = -111.0
|
margin_bottom = -151.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
@ -53,6 +53,8 @@ custom_fonts/font = ExtResource( 2 )
|
|||||||
custom_colors/font_color = Color( 0.443137, 0.709804, 0.819608, 0.533333 )
|
custom_colors/font_color = Color( 0.443137, 0.709804, 0.819608, 0.533333 )
|
||||||
custom_colors/font_color_shadow = Color( 1, 1, 1, 0.0968627 )
|
custom_colors/font_color_shadow = Color( 1, 1, 1, 0.0968627 )
|
||||||
text = "PAUSE"
|
text = "PAUSE"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
lines_skipped = 0
|
lines_skipped = 0
|
||||||
max_lines_visible = -1
|
max_lines_visible = -1
|
||||||
@ -81,10 +83,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 50.0
|
margin_left = 20.0
|
||||||
margin_top = 50.0
|
margin_top = 65.0
|
||||||
margin_right = 90.0
|
margin_right = 60.0
|
||||||
margin_bottom = 90.0
|
margin_bottom = 105.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -99,7 +101,7 @@ anchor_top = 0.0
|
|||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 80.0
|
margin_left = 80.0
|
||||||
margin_right = 155.0
|
margin_right = 174.0
|
||||||
margin_bottom = 37.0
|
margin_bottom = 37.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -113,6 +115,7 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
_sections_unfolded = [ "Rect" ]
|
_sections_unfolded = [ "Rect" ]
|
||||||
@ -120,7 +123,7 @@ _sections_unfolded = [ "Rect" ]
|
|||||||
[node name="arrowLeft" type="Sprite" parent="bindings/move_left" index="1"]
|
[node name="arrowLeft" type="Sprite" parent="bindings/move_left" index="1"]
|
||||||
|
|
||||||
position = Vector2( 30, 20 )
|
position = Vector2( 30, 20 )
|
||||||
scale = Vector2( 0.9, 0.9 )
|
scale = Vector2( 0.75, 0.75 )
|
||||||
texture = ExtResource( 4 )
|
texture = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="move_right" type="Control" parent="bindings" index="1"]
|
[node name="move_right" type="Control" parent="bindings" index="1"]
|
||||||
@ -129,10 +132,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 226.0
|
margin_left = 220.0
|
||||||
margin_top = 51.0
|
margin_top = 65.0
|
||||||
margin_right = 266.0
|
margin_right = 260.0
|
||||||
margin_bottom = 91.0
|
margin_bottom = 105.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -148,7 +151,7 @@ anchor_right = 0.0
|
|||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 84.0
|
margin_left = 84.0
|
||||||
margin_top = -1.0
|
margin_top = -1.0
|
||||||
margin_right = 159.0
|
margin_right = 178.0
|
||||||
margin_bottom = 36.0
|
margin_bottom = 36.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -162,12 +165,15 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
|
_sections_unfolded = [ "custom_fonts" ]
|
||||||
|
|
||||||
[node name="arrowRight" type="Sprite" parent="bindings/move_right" index="1"]
|
[node name="arrowRight" type="Sprite" parent="bindings/move_right" index="1"]
|
||||||
|
|
||||||
position = Vector2( 34, 19 )
|
position = Vector2( 34, 19 )
|
||||||
|
scale = Vector2( 0.8, 0.8 )
|
||||||
texture = ExtResource( 5 )
|
texture = ExtResource( 5 )
|
||||||
_sections_unfolded = [ "Transform" ]
|
_sections_unfolded = [ "Transform" ]
|
||||||
|
|
||||||
@ -177,10 +183,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 230.0
|
margin_left = 224.0
|
||||||
margin_top = 100.0
|
margin_top = 114.0
|
||||||
margin_right = 270.0
|
margin_right = 264.0
|
||||||
margin_bottom = 140.0
|
margin_bottom = 154.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -195,7 +201,7 @@ anchor_top = 0.0
|
|||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 80.0
|
margin_left = 80.0
|
||||||
margin_right = 155.0
|
margin_right = 174.0
|
||||||
margin_bottom = 37.0
|
margin_bottom = 37.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -209,13 +215,15 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
_sections_unfolded = [ "custom_fonts" ]
|
_sections_unfolded = [ "Rect", "custom_fonts" ]
|
||||||
|
|
||||||
[node name="clockwise" type="Sprite" parent="bindings/rotate_clockwise" index="1"]
|
[node name="clockwise" type="Sprite" parent="bindings/rotate_clockwise" index="1"]
|
||||||
|
|
||||||
position = Vector2( 30, 15 )
|
position = Vector2( 30, 15 )
|
||||||
|
scale = Vector2( 0.8, 0.8 )
|
||||||
texture = ExtResource( 6 )
|
texture = ExtResource( 6 )
|
||||||
|
|
||||||
[node name="rotate_counterclockwise" type="Control" parent="bindings" index="3"]
|
[node name="rotate_counterclockwise" type="Control" parent="bindings" index="3"]
|
||||||
@ -224,10 +232,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 45.0
|
margin_left = 15.0
|
||||||
margin_top = 100.0
|
margin_top = 115.0
|
||||||
margin_right = 85.0
|
margin_right = 55.0
|
||||||
margin_bottom = 140.0
|
margin_bottom = 155.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -243,7 +251,7 @@ anchor_right = 0.0
|
|||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 84.0
|
margin_left = 84.0
|
||||||
margin_top = -1.0
|
margin_top = -1.0
|
||||||
margin_right = 159.0
|
margin_right = 178.0
|
||||||
margin_bottom = 36.0
|
margin_bottom = 36.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -257,13 +265,15 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
_sections_unfolded = [ "Rect" ]
|
_sections_unfolded = [ "Rect" ]
|
||||||
|
|
||||||
[node name="counterclockwise" type="Sprite" parent="bindings/rotate_counterclockwise" index="1"]
|
[node name="counterclockwise" type="Sprite" parent="bindings/rotate_counterclockwise" index="1"]
|
||||||
|
|
||||||
position = Vector2( 34, 14 )
|
position = Vector2( 35, 15 )
|
||||||
|
scale = Vector2( 0.82, 0.82 )
|
||||||
texture = ExtResource( 7 )
|
texture = ExtResource( 7 )
|
||||||
|
|
||||||
[node name="soft_drop" type="Control" parent="bindings" index="4"]
|
[node name="soft_drop" type="Control" parent="bindings" index="4"]
|
||||||
@ -272,10 +282,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 50.0
|
margin_left = 20.0
|
||||||
margin_top = 150.0
|
margin_top = 165.0
|
||||||
margin_right = 90.0
|
margin_right = 60.0
|
||||||
margin_bottom = 190.0
|
margin_bottom = 205.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -290,7 +300,7 @@ anchor_top = 0.0
|
|||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 80.0
|
margin_left = 80.0
|
||||||
margin_right = 155.0
|
margin_right = 174.0
|
||||||
margin_bottom = 37.0
|
margin_bottom = 37.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -304,12 +314,14 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
|
|
||||||
[node name="arrowDown" type="Sprite" parent="bindings/soft_drop" index="1"]
|
[node name="arrowDown" type="Sprite" parent="bindings/soft_drop" index="1"]
|
||||||
|
|
||||||
position = Vector2( 30, 20 )
|
position = Vector2( 30, 20 )
|
||||||
|
scale = Vector2( 0.8, 0.8 )
|
||||||
texture = ExtResource( 8 )
|
texture = ExtResource( 8 )
|
||||||
_sections_unfolded = [ "Transform" ]
|
_sections_unfolded = [ "Transform" ]
|
||||||
|
|
||||||
@ -319,10 +331,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 226.0
|
margin_left = 220.0
|
||||||
margin_top = 151.0
|
margin_top = 165.0
|
||||||
margin_right = 266.0
|
margin_right = 260.0
|
||||||
margin_bottom = 191.0
|
margin_bottom = 205.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -338,7 +350,7 @@ anchor_right = 0.0
|
|||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 84.0
|
margin_left = 84.0
|
||||||
margin_top = -1.0
|
margin_top = -1.0
|
||||||
margin_right = 159.0
|
margin_right = 178.0
|
||||||
margin_bottom = 36.0
|
margin_bottom = 36.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -352,13 +364,16 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
|
|
||||||
[node name="harddrop" type="Sprite" parent="bindings/hard_drop" index="1"]
|
[node name="harddrop" type="Sprite" parent="bindings/hard_drop" index="1"]
|
||||||
|
|
||||||
position = Vector2( 34, 19 )
|
position = Vector2( 34, 19 )
|
||||||
|
scale = Vector2( 0.75, 0.75 )
|
||||||
texture = ExtResource( 9 )
|
texture = ExtResource( 9 )
|
||||||
|
_sections_unfolded = [ "Transform", "Z Index" ]
|
||||||
|
|
||||||
[node name="hold" type="Control" parent="bindings" index="6"]
|
[node name="hold" type="Control" parent="bindings" index="6"]
|
||||||
|
|
||||||
@ -366,10 +381,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 50.0
|
margin_left = 20.0
|
||||||
margin_top = 200.0
|
margin_top = 215.0
|
||||||
margin_right = 90.0
|
margin_right = 60.0
|
||||||
margin_bottom = 240.0
|
margin_bottom = 255.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -384,7 +399,7 @@ anchor_top = 0.0
|
|||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 80.0
|
margin_left = 80.0
|
||||||
margin_right = 155.0
|
margin_right = 174.0
|
||||||
margin_bottom = 37.0
|
margin_bottom = 37.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -398,12 +413,14 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
|
|
||||||
[node name="hold" type="Sprite" parent="bindings/hold" index="1"]
|
[node name="hold" type="Sprite" parent="bindings/hold" index="1"]
|
||||||
|
|
||||||
position = Vector2( 30, 20 )
|
position = Vector2( 30, 20 )
|
||||||
|
scale = Vector2( 0.8, 0.8 )
|
||||||
texture = ExtResource( 10 )
|
texture = ExtResource( 10 )
|
||||||
|
|
||||||
[node name="pause" type="Control" parent="bindings" index="7"]
|
[node name="pause" type="Control" parent="bindings" index="7"]
|
||||||
@ -412,10 +429,10 @@ anchor_left = 0.0
|
|||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 226.0
|
margin_left = 220.0
|
||||||
margin_top = 201.0
|
margin_top = 215.0
|
||||||
margin_right = 266.0
|
margin_right = 260.0
|
||||||
margin_bottom = 241.0
|
margin_bottom = 255.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
@ -431,7 +448,7 @@ anchor_right = 0.0
|
|||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 84.0
|
margin_left = 84.0
|
||||||
margin_top = -1.0
|
margin_top = -1.0
|
||||||
margin_right = 159.0
|
margin_right = 178.0
|
||||||
margin_bottom = 36.0
|
margin_bottom = 36.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
@ -445,12 +462,41 @@ toggle_mode = false
|
|||||||
enabled_focus_mode = 2
|
enabled_focus_mode = 2
|
||||||
shortcut = null
|
shortcut = null
|
||||||
group = null
|
group = null
|
||||||
|
text = "Press key"
|
||||||
flat = false
|
flat = false
|
||||||
align = 1
|
align = 1
|
||||||
|
|
||||||
[node name="pause" type="Sprite" parent="bindings/pause" index="1"]
|
[node name="pause" type="Sprite" parent="bindings/pause" index="1"]
|
||||||
|
|
||||||
position = Vector2( 34, 19 )
|
position = Vector2( 34, 19 )
|
||||||
|
scale = Vector2( 0.8, 0.8 )
|
||||||
texture = ExtResource( 11 )
|
texture = ExtResource( 11 )
|
||||||
|
_sections_unfolded = [ "Transform" ]
|
||||||
|
|
||||||
|
[node name="hint" type="Label" parent="." index="2"]
|
||||||
|
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
margin_left = -220.0
|
||||||
|
margin_top = -135.0
|
||||||
|
margin_right = 280.0
|
||||||
|
margin_bottom = -84.0
|
||||||
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
|
rect_clip_content = false
|
||||||
|
mouse_filter = 2
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 4
|
||||||
|
custom_fonts/font = ExtResource( 3 )
|
||||||
|
text = "Press [pause key] to resume
|
||||||
|
or click on a button to change key assignment"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
percent_visible = 1.0
|
||||||
|
lines_skipped = 0
|
||||||
|
max_lines_visible = -1
|
||||||
|
_sections_unfolded = [ "custom_fonts" ]
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,13 +36,13 @@ func set_instrument( instrument ):
|
|||||||
self.ads_state = instrument.ads_state
|
self.ads_state = instrument.ads_state
|
||||||
self.release_state = instrument.release_state
|
self.release_state = instrument.release_state
|
||||||
|
|
||||||
func play( ):
|
func play( from_position=0.0 ):
|
||||||
self.releasing = false
|
self.releasing = false
|
||||||
self.timer = 0.0
|
self.timer = 0.0
|
||||||
self.using_timer = 0.0
|
self.using_timer = 0.0
|
||||||
self.current_volume = self.ads_state[0].volume
|
self.current_volume = self.ads_state[0].volume
|
||||||
self.stream.mix_rate = round( self.mix_rate * ( 1.0 + self.pitch_bend * 0.5 ) )
|
self.stream.mix_rate = round( self.mix_rate * ( 1.0 + self.pitch_bend * 0.5 ) )
|
||||||
.play( 0.0 )
|
.play( from_position )
|
||||||
self._update_volume( )
|
self._update_volume( )
|
||||||
|
|
||||||
func start_release( ):
|
func start_release( ):
|
||||||
|
@ -19,7 +19,7 @@ export var play_speed = 1.0
|
|||||||
export var volume_db = -30
|
export var volume_db = -30
|
||||||
export var key_shift = 0
|
export var key_shift = 0
|
||||||
export var loop = false
|
export var loop = false
|
||||||
export var loop_start = 1.81
|
export var loop_start = 0
|
||||||
export var soundfont = ""
|
export var soundfont = ""
|
||||||
export var mix_target = AudioStreamPlayer.MIX_TARGET_STEREO
|
export var mix_target = AudioStreamPlayer.MIX_TARGET_STEREO
|
||||||
export var bus = "Master"
|
export var bus = "Master"
|
||||||
|
BIN
source/midi/music-a-dance-remix-.mid
Normal file
@ -6,7 +6,12 @@
|
|||||||
; [section] ; section goes between []
|
; [section] ; section goes between []
|
||||||
; param=value ; assign values to parameters
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
config_version=3
|
config_version=4
|
||||||
|
|
||||||
|
_global_script_classes=[ ]
|
||||||
|
_global_script_class_icons={
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
@ -17,10 +22,10 @@ config/icon="res://icons/48.png"
|
|||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/size/width=500
|
window/size/width=640
|
||||||
window/size/height=500
|
window/size/height=480
|
||||||
window/vsync/use_vsync=false
|
window/vsync/use_vsync=false
|
||||||
window/stretch/aspect="expand"
|
window/stretch/aspect="keep_height"
|
||||||
|
|
||||||
[gui]
|
[gui]
|
||||||
|
|
||||||
@ -28,26 +33,56 @@ theme/use_hidpi=true
|
|||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
hold=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"unicode":0,"echo":false,"script":null)
|
hold={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
pause=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
pause={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
hard_drop=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
hard_drop={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
move_left=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
move_left={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
soft_drop=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
soft_drop={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
move_right=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
move_right={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
rotate_clockwise=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
rotate_clockwise={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
rotate_counterclockwise=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777238,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
rotate_counterclockwise={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777238,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
toggle_fullscreen=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
}
|
||||||
|
toggle_fullscreen={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
quality/driver/driver_name="GLES2"
|
||||||
|
quality/filters/use_nearest_mipmap_filter=true
|
||||||
environment/default_clear_color=Color( 0, 0, 0, 1 )
|
environment/default_clear_color=Color( 0, 0, 0, 1 )
|
||||||
|
environment/default_environment="res://Environment.tres"
|
||||||
quality/main_loop_type=""
|
quality/main_loop_type=""
|
||||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 396 KiB |
@ -10,7 +10,7 @@
|
|||||||
border: 0 none;
|
border: 0 none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #222226;
|
background-color: #000000;
|
||||||
font-family: 'Noto Sans', Arial, sans-serif;
|
font-family: 'Noto Sans', Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
.godot {
|
.godot {
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
background-color: #3b3943;
|
background-color: #000000;
|
||||||
background-image: linear-gradient(to bottom, #403e48, #35333c);
|
background-image: linear-gradient(to bottom, #403e48, #35333c);
|
||||||
border: 1px solid #45434e;
|
border: 1px solid #45434e;
|
||||||
box-shadow: 0 0 1px 1px #2f2d35;
|
box-shadow: 0 0 1px 1px #2f2d35;
|
||||||
@ -65,6 +65,8 @@
|
|||||||
* ================ */
|
* ================ */
|
||||||
|
|
||||||
#container {
|
#container {
|
||||||
|
background-image: url("TETRIS3000.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
display: inline-block; /* scale with canvas */
|
display: inline-block; /* scale with canvas */
|
||||||
vertical-align: top; /* prevent extra height */
|
vertical-align: top; /* prevent extra height */
|
||||||
position: relative; /* root for absolutely positioned overlay */
|
position: relative; /* root for absolutely positioned overlay */
|
||||||
|
12983
web/TETRIS3000.js
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 396 KiB |
Before Width: | Height: | Size: 398 KiB After Width: | Height: | Size: 421 KiB |