Add a new level (starfield), and display level name on the game screen.
This commit is contained in:
parent
1728dc5ee5
commit
0d6809d1fb
|
@ -0,0 +1,175 @@
|
||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://levels/base_level.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://blocks/star.tscn" type="PackedScene" id=3]
|
||||||
|
|
||||||
|
[node name="Level_02_05" instance=ExtResource( 1 )]
|
||||||
|
level_name = "Starfield"
|
||||||
|
|
||||||
|
[node name="Star" parent="." index="0" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 160, 152 )
|
||||||
|
|
||||||
|
[node name="Star2" parent="." index="1" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 288, 152 )
|
||||||
|
|
||||||
|
[node name="Star3" parent="." index="2" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 416, 152 )
|
||||||
|
|
||||||
|
[node name="Star4" parent="." index="3" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 544, 152 )
|
||||||
|
|
||||||
|
[node name="Star5" parent="." index="4" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 672, 152 )
|
||||||
|
|
||||||
|
[node name="Star6" parent="." index="5" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 800, 152 )
|
||||||
|
|
||||||
|
[node name="Star7" parent="." index="6" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 224, 216 )
|
||||||
|
|
||||||
|
[node name="Star8" parent="." index="7" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 352, 216 )
|
||||||
|
|
||||||
|
[node name="Star9" parent="." index="8" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 480, 216 )
|
||||||
|
|
||||||
|
[node name="Star10" parent="." index="9" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 608, 216 )
|
||||||
|
|
||||||
|
[node name="Star11" parent="." index="10" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 736, 216 )
|
||||||
|
|
||||||
|
[node name="Star12" parent="." index="11" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 864, 216 )
|
||||||
|
|
||||||
|
[node name="Star13" parent="." index="12" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 160, 280 )
|
||||||
|
|
||||||
|
[node name="Star14" parent="." index="13" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 288, 280 )
|
||||||
|
|
||||||
|
[node name="Star15" parent="." index="14" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 416, 280 )
|
||||||
|
|
||||||
|
[node name="Star16" parent="." index="15" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 544, 280 )
|
||||||
|
|
||||||
|
[node name="Star17" parent="." index="16" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 672, 280 )
|
||||||
|
|
||||||
|
[node name="Star18" parent="." index="17" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 800, 280 )
|
||||||
|
|
||||||
|
[node name="Star19" parent="." index="18" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 224, 344 )
|
||||||
|
|
||||||
|
[node name="Star20" parent="." index="19" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 352, 344 )
|
||||||
|
|
||||||
|
[node name="Star21" parent="." index="20" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 480, 344 )
|
||||||
|
|
||||||
|
[node name="Star22" parent="." index="21" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 608, 344 )
|
||||||
|
|
||||||
|
[node name="Star23" parent="." index="22" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 736, 344 )
|
||||||
|
|
||||||
|
[node name="Star24" parent="." index="23" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 864, 344 )
|
||||||
|
|
||||||
|
[node name="Star25" parent="." index="24" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 160, 168 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star26" parent="." index="25" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 288, 168 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star27" parent="." index="26" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 416, 168 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star28" parent="." index="27" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 544, 168 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star29" parent="." index="28" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 672, 168 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star30" parent="." index="29" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 800, 168 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star31" parent="." index="30" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 224, 232 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star32" parent="." index="31" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 352, 232 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star33" parent="." index="32" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 480, 232 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star34" parent="." index="33" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 608, 232 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star35" parent="." index="34" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 736, 232 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star36" parent="." index="35" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 864, 232 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star37" parent="." index="36" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 160, 296 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star38" parent="." index="37" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 288, 296 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star39" parent="." index="38" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 416, 296 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star40" parent="." index="39" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 544, 296 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star41" parent="." index="40" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 672, 296 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star42" parent="." index="41" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 800, 296 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star43" parent="." index="42" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 224, 360 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star44" parent="." index="43" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 352, 360 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star45" parent="." index="44" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 480, 360 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star46" parent="." index="45" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 608, 360 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star47" parent="." index="46" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 736, 360 )
|
||||||
|
rotation = 3.14159
|
||||||
|
|
||||||
|
[node name="Star48" parent="." index="47" instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 864, 360 )
|
||||||
|
rotation = 3.14159
|
|
@ -16,7 +16,7 @@ var Levels = [
|
||||||
preload("res://levels/level_02_02.tscn"), # "Flowers" - Non-regular hexagons
|
preload("res://levels/level_02_02.tscn"), # "Flowers" - Non-regular hexagons
|
||||||
preload("res://levels/level_02_03.tscn"), # "Leaves" - (no new block)
|
preload("res://levels/level_02_03.tscn"), # "Leaves" - (no new block)
|
||||||
preload("res://levels/level_02_04.tscn"), # "Aquarium" - Fish blocks (+ Leaves)
|
preload("res://levels/level_02_04.tscn"), # "Aquarium" - Fish blocks (+ Leaves)
|
||||||
# "Mouses" - Mouse blocks (+ wall)
|
preload("res://levels/level_02_05.tscn"), # "Stars" - Star3 blocks
|
||||||
# - Moving/Timing blocks - #
|
# - Moving/Timing blocks - #
|
||||||
# "Invasion" - Left-right movement
|
# "Invasion" - Left-right movement
|
||||||
# "Ghosts" - Blinking blocks : block appear / disappear
|
# "Ghosts" - Blinking blocks : block appear / disappear
|
||||||
|
@ -67,6 +67,7 @@ func new_level():
|
||||||
level = Levels[current_level].instance()
|
level = Levels[current_level].instance()
|
||||||
level.connect("level_ended", self, "_on_level_ended")
|
level.connect("level_ended", self, "_on_level_ended")
|
||||||
level.connect("score_increased", self, "_on_score_increased")
|
level.connect("score_increased", self, "_on_score_increased")
|
||||||
|
$LevelName.text = level.level_name
|
||||||
call_deferred("add_child", level)
|
call_deferred("add_child", level)
|
||||||
|
|
||||||
func new_ball():
|
func new_ball():
|
||||||
|
|
|
@ -26,7 +26,7 @@ position = Vector2( 512, 560 )
|
||||||
[node name="Score" type="Label" parent="."]
|
[node name="Score" type="Label" parent="."]
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
margin_left = -472.0
|
margin_left = -440.0
|
||||||
margin_right = -72.0
|
margin_right = -72.0
|
||||||
margin_bottom = 32.0
|
margin_bottom = 32.0
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
@ -66,4 +66,16 @@ stream = ExtResource( 6 )
|
||||||
volume_db = -12.0
|
volume_db = -12.0
|
||||||
autoplay = true
|
autoplay = true
|
||||||
|
|
||||||
|
[node name="LevelName" type="Label" parent="."]
|
||||||
|
margin_left = 72.0
|
||||||
|
margin_right = 440.0
|
||||||
|
margin_bottom = 32.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
custom_colors/font_color = Color( 0.552941, 0.960784, 0.505882, 1 )
|
||||||
|
text = "NAME"
|
||||||
|
valign = 1
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[connection signal="timeout" from="EndLevelTimer" to="." method="_on_EndLevelTimer_timeout"]
|
[connection signal="timeout" from="EndLevelTimer" to="." method="_on_EndLevelTimer_timeout"]
|
||||||
|
|
Loading…
Reference in New Issue