flash text3
This commit is contained in:
parent
b2c8ecdbb7
commit
26fa6105a9
15
Main.gd
15
Main.gd
@ -26,13 +26,8 @@ const SCORES = [
|
|||||||
[5, 16],
|
[5, 16],
|
||||||
[8]
|
[8]
|
||||||
]
|
]
|
||||||
const SCORE_NAMES = [
|
const LINES_CLEARED_NAMES = ["", "SINGLE", "DOUBLE", "TRIPLE", "TETRIS"]
|
||||||
["", "T-SPIN", "MINI T-SPIN"],
|
const T_SPIN_NAMES = ["", "T-SPIN", "MINI T-SPIN"]
|
||||||
["SINGLE", "T-SPIN SINGLE", "MINI T-SPIN SINGLE"],
|
|
||||||
["DOUBLE", "T-SPIN DOUBLE"],
|
|
||||||
["TRIPLE", "T-SPIN TRIPLE"],
|
|
||||||
["TETRIS"],
|
|
||||||
]
|
|
||||||
|
|
||||||
const LINE_CLEAR_MIDI_CHANNELS = [2, 6]
|
const LINE_CLEAR_MIDI_CHANNELS = [2, 6]
|
||||||
|
|
||||||
@ -160,7 +155,11 @@ func lock():
|
|||||||
if lines_cleared or current_piece.t_spin:
|
if lines_cleared or current_piece.t_spin:
|
||||||
var new_score = SCORES[lines_cleared][current_piece.t_spin]
|
var new_score = SCORES[lines_cleared][current_piece.t_spin]
|
||||||
$Stats.update_score(new_score)
|
$Stats.update_score(new_score)
|
||||||
flash_print(SCORE_NAMES[lines_cleared][current_piece.t_spin] + "\n%d"%(100*new_score))
|
if current_piece.t_spin:
|
||||||
|
flash_print(T_SPIN_NAMES[current_piece.t_spin])
|
||||||
|
if lines_cleared:
|
||||||
|
flash_print(LINES_CLEARED_NAMES[lines_cleared])
|
||||||
|
flash_print(str(100*new_score))
|
||||||
if lines_cleared == Tetromino.NB_MINOES:
|
if lines_cleared == Tetromino.NB_MINOES:
|
||||||
for channel in LINE_CLEAR_MIDI_CHANNELS:
|
for channel in LINE_CLEAR_MIDI_CHANNELS:
|
||||||
$MidiPlayer.channel_status[channel].vomume = 127
|
$MidiPlayer.channel_status[channel].vomume = 127
|
||||||
|
@ -216,7 +216,7 @@ 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 ) ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Main" type="WorldEnvironment" index="0"]
|
[node name="Main" type="WorldEnvironment"]
|
||||||
|
|
||||||
environment = SubResource( 2 )
|
environment = SubResource( 2 )
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
@ -420,8 +420,6 @@ size_flags_horizontal = 1
|
|||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 6 )
|
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 )
|
||||||
text = "TETRIS
|
|
||||||
3000"
|
|
||||||
align = 1
|
align = 1
|
||||||
valign = 1
|
valign = 1
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
|
98
Stats.tscn
98
Stats.tscn
@ -3,17 +3,17 @@
|
|||||||
[ext_resource path="res://Stats.gd" type="Script" id=1]
|
[ext_resource path="res://Stats.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=2]
|
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=2]
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=2]
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
|
||||||
size = 18
|
size = 20
|
||||||
use_mipmaps = false
|
use_mipmaps = false
|
||||||
use_filter = false
|
use_filter = false
|
||||||
font_data = ExtResource( 2 )
|
font_data = ExtResource( 2 )
|
||||||
_sections_unfolded = [ "Font", "Settings" ]
|
_sections_unfolded = [ "Font", "Settings" ]
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=1]
|
[sub_resource type="DynamicFont" id=2]
|
||||||
|
|
||||||
size = 16
|
size = 18
|
||||||
use_mipmaps = false
|
use_mipmaps = false
|
||||||
use_filter = false
|
use_filter = false
|
||||||
font_data = ExtResource( 2 )
|
font_data = ExtResource( 2 )
|
||||||
@ -44,8 +44,8 @@ anchor_top = 0.0
|
|||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 16.0
|
margin_left = 16.0
|
||||||
margin_right = 119.0
|
margin_right = 133.0
|
||||||
margin_bottom = 67.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 = 1
|
mouse_filter = 1
|
||||||
@ -61,8 +61,8 @@ 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_right = 59.0
|
margin_right = 68.0
|
||||||
margin_bottom = 67.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 = 1
|
mouse_filter = 1
|
||||||
@ -79,15 +79,15 @@ 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_right = 59.0
|
margin_right = 68.0
|
||||||
margin_bottom = 15.0
|
margin_bottom = 17.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 2 )
|
custom_fonts/font = SubResource( 1 )
|
||||||
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 )
|
||||||
text = "Score:"
|
text = "Score:"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -101,16 +101,16 @@ 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 = 15.0
|
margin_top = 17.0
|
||||||
margin_right = 59.0
|
margin_right = 68.0
|
||||||
margin_bottom = 28.0
|
margin_bottom = 32.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "High score:"
|
text = "High score:"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -124,16 +124,16 @@ 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 = 28.0
|
margin_top = 32.0
|
||||||
margin_right = 59.0
|
margin_right = 68.0
|
||||||
margin_bottom = 41.0
|
margin_bottom = 47.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "Time"
|
text = "Time"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -146,16 +146,16 @@ 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 = 41.0
|
margin_top = 47.0
|
||||||
margin_right = 59.0
|
margin_right = 68.0
|
||||||
margin_bottom = 54.0
|
margin_bottom = 62.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "Level:"
|
text = "Level:"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -168,16 +168,16 @@ 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 = 54.0
|
margin_top = 62.0
|
||||||
margin_right = 59.0
|
margin_right = 68.0
|
||||||
margin_bottom = 67.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 = 2
|
mouse_filter = 2
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "Goal:"
|
text = "Goal:"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -190,9 +190,9 @@ 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 = 67.0
|
margin_left = 76.0
|
||||||
margin_right = 103.0
|
margin_right = 117.0
|
||||||
margin_bottom = 67.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 = 1
|
mouse_filter = 1
|
||||||
@ -209,15 +209,15 @@ 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_right = 36.0
|
margin_right = 41.0
|
||||||
margin_bottom = 15.0
|
margin_bottom = 17.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 2 )
|
custom_fonts/font = SubResource( 1 )
|
||||||
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 )
|
||||||
text = "0"
|
text = "0"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -231,16 +231,16 @@ 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 = 15.0
|
margin_top = 17.0
|
||||||
margin_right = 36.0
|
margin_right = 41.0
|
||||||
margin_bottom = 28.0
|
margin_bottom = 32.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "0"
|
text = "0"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -253,16 +253,16 @@ 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 = 28.0
|
margin_top = 32.0
|
||||||
margin_right = 36.0
|
margin_right = 41.0
|
||||||
margin_bottom = 41.0
|
margin_bottom = 47.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "0:00:00"
|
text = "0:00:00"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -275,16 +275,16 @@ 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 = 41.0
|
margin_top = 47.0
|
||||||
margin_right = 36.0
|
margin_right = 41.0
|
||||||
margin_bottom = 54.0
|
margin_bottom = 62.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
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "0"
|
text = "0"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
@ -297,16 +297,16 @@ 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 = 54.0
|
margin_top = 62.0
|
||||||
margin_right = 36.0
|
margin_right = 41.0
|
||||||
margin_bottom = 67.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 = 2
|
mouse_filter = 2
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 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 )
|
||||||
text = "0"
|
text = "0"
|
||||||
percent_visible = 1.0
|
percent_visible = 1.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user