Re-organize HUD scene to remove redundant control node
This commit is contained in:
parent
2caeb7f2ee
commit
bfab439995
5 changed files with 76 additions and 44 deletions
36
maps/abyss.tscn
Normal file
36
maps/abyss.tscn
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://maps/map.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=2]
|
||||||
|
[ext_resource path="res://graphics/backgrounds/abyss.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://scripts/water_ripple.gdshader" type="Shader" id=4]
|
||||||
|
[ext_resource path="res://audio/music/moon_trail.ogg" type="AudioStream" id=5]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=1]
|
||||||
|
shader = ExtResource( 4 )
|
||||||
|
shader_param/offset = 1.5
|
||||||
|
shader_param/speed = 0.5
|
||||||
|
shader_param/waves = 2.0
|
||||||
|
|
||||||
|
[node name="Map" type="Node2D" groups=["map"]]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
target_time_any = 60
|
||||||
|
target_time_100 = 120
|
||||||
|
music = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="BackgroundLayer" type="CanvasLayer" parent="."]
|
||||||
|
layer = -50
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="BackgroundLayer"]
|
||||||
|
texture = ExtResource( 3 )
|
||||||
|
centered = false
|
||||||
|
|
||||||
|
[node name="WaterEffect" type="CanvasLayer" parent="."]
|
||||||
|
layer = 50
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="WaterEffect"]
|
||||||
|
material = SubResource( 1 )
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
|
||||||
|
[node name="HUD" parent="." instance=ExtResource( 2 )]
|
|
@ -509,7 +509,7 @@ color = 3
|
||||||
position = Vector2( 496, 16 )
|
position = Vector2( 496, 16 )
|
||||||
color = 4
|
color = 4
|
||||||
|
|
||||||
[node name="CanvasLayer" parent="." instance=ExtResource( 7 )]
|
[node name="HUD" parent="." instance=ExtResource( 7 )]
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
margin_left = 256.0
|
margin_left = 256.0
|
||||||
|
|
|
@ -45,7 +45,7 @@ __meta__ = {
|
||||||
"_edit_lock_": true
|
"_edit_lock_": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="CanvasLayer" parent="." instance=ExtResource( 4 )]
|
[node name="HUD" parent="." instance=ExtResource( 4 )]
|
||||||
|
|
||||||
[node name="Ground" type="TileMap" parent="."]
|
[node name="Ground" type="TileMap" parent="."]
|
||||||
tile_set = ExtResource( 2 )
|
tile_set = ExtResource( 2 )
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
extends Control
|
extends CanvasLayer
|
||||||
|
|
||||||
onready var gold_counter = $GoldCounter
|
onready var gold_counter = $GoldCounter
|
||||||
onready var shard_counter = $ShardCounter
|
onready var shard_counter = $ShardCounter
|
||||||
|
|
|
@ -9,118 +9,114 @@
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id=2]
|
[sub_resource type="ShaderMaterial" id=2]
|
||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer"]
|
[node name="HUD" type="CanvasLayer"]
|
||||||
layer = 100
|
layer = 100
|
||||||
|
|
||||||
[node name="HUD" type="Control" parent="."]
|
|
||||||
margin_top = 1.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
script = ExtResource( 6 )
|
script = ExtResource( 6 )
|
||||||
bonus_color = Color( 0.478431, 1, 0.47451, 1 )
|
bonus_color = Color( 0.478431, 1, 0.47451, 1 )
|
||||||
|
|
||||||
[node name="Back" type="Sprite" parent="HUD"]
|
[node name="Back" type="Sprite" parent="."]
|
||||||
position = Vector2( 128, 95 )
|
position = Vector2( 128, 96 )
|
||||||
texture = ExtResource( 3 )
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="GoldCounter" type="Label" parent="HUD"]
|
[node name="GoldCounter" type="Label" parent="."]
|
||||||
margin_left = 12.0
|
margin_left = 12.0
|
||||||
margin_top = -2.0
|
margin_top = -1.0
|
||||||
margin_right = 52.0
|
margin_right = 52.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 19.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "00
|
text = "00
|
||||||
"
|
"
|
||||||
|
|
||||||
[node name="ShardCounter" type="Label" parent="HUD"]
|
[node name="ShardCounter" type="Label" parent="."]
|
||||||
margin_left = 41.0
|
margin_left = 41.0
|
||||||
margin_top = -2.0
|
margin_top = -1.0
|
||||||
margin_right = 81.0
|
margin_right = 81.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 19.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "0"
|
text = "0"
|
||||||
|
|
||||||
[node name="RedStar" type="Sprite" parent="HUD"]
|
[node name="RedStar" type="Sprite" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
material = SubResource( 1 )
|
material = SubResource( 1 )
|
||||||
position = Vector2( 83, 5 )
|
position = Vector2( 83, 6 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 0, 0, 8, 8 )
|
region_rect = Rect2( 0, 0, 8, 8 )
|
||||||
|
|
||||||
[node name="YellowStar" type="Sprite" parent="HUD"]
|
[node name="YellowStar" type="Sprite" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
material = SubResource( 2 )
|
material = SubResource( 2 )
|
||||||
position = Vector2( 93, 5 )
|
position = Vector2( 93, 6 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 8, 0, 8, 8 )
|
region_rect = Rect2( 8, 0, 8, 8 )
|
||||||
|
|
||||||
[node name="GreenStar" type="Sprite" parent="HUD"]
|
[node name="GreenStar" type="Sprite" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
position = Vector2( 103, 5 )
|
position = Vector2( 103, 6 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 16, 0, 8, 8 )
|
region_rect = Rect2( 16, 0, 8, 8 )
|
||||||
|
|
||||||
[node name="BlueStar" type="Sprite" parent="HUD"]
|
[node name="BlueStar" type="Sprite" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
position = Vector2( 113, 5 )
|
position = Vector2( 113, 6 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 24, 0, 8, 8 )
|
region_rect = Rect2( 24, 0, 8, 8 )
|
||||||
|
|
||||||
[node name="MagentaStar" type="Sprite" parent="HUD"]
|
[node name="MagentaStar" type="Sprite" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
position = Vector2( 123, 5 )
|
position = Vector2( 123, 6 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2( 32, 0, 8, 8 )
|
region_rect = Rect2( 32, 0, 8, 8 )
|
||||||
|
|
||||||
[node name="ScoreText" type="Label" parent="HUD"]
|
[node name="ScoreText" type="Label" parent="."]
|
||||||
margin_left = 137.0
|
margin_left = 137.0
|
||||||
margin_top = -2.0
|
margin_top = -1.0
|
||||||
margin_right = 221.0
|
margin_right = 221.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 19.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "SCORE:"
|
text = "SCORE:"
|
||||||
|
|
||||||
[node name="ScoreCounter" type="Label" parent="HUD"]
|
[node name="ScoreCounter" type="Label" parent="."]
|
||||||
margin_left = 179.0
|
margin_left = 179.0
|
||||||
margin_top = -2.0
|
margin_top = -1.0
|
||||||
margin_right = 263.0
|
margin_right = 263.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 19.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "00000"
|
text = "00000"
|
||||||
|
|
||||||
[node name="HighCounter" type="Label" parent="HUD"]
|
[node name="HighCounter" type="Label" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
margin_left = 178.0
|
margin_left = 178.0
|
||||||
margin_top = 178.0
|
margin_top = 179.0
|
||||||
margin_right = 262.0
|
margin_right = 262.0
|
||||||
margin_bottom = 198.0
|
margin_bottom = 199.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "High:000000"
|
text = "High:000000"
|
||||||
|
|
||||||
[node name="LivesCounter" type="Label" parent="HUD"]
|
[node name="LivesCounter" type="Label" parent="."]
|
||||||
margin_left = 240.0
|
margin_left = 240.0
|
||||||
margin_top = -2.0
|
margin_top = -1.0
|
||||||
margin_right = 324.0
|
margin_right = 324.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 19.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "2"
|
text = "2"
|
||||||
|
|
||||||
[node name="ArrowCounter" type="Label" parent="HUD"]
|
[node name="ArrowCounter" type="Label" parent="."]
|
||||||
margin_left = 61.0
|
margin_left = 61.0
|
||||||
margin_top = -2.0
|
margin_top = -1.0
|
||||||
margin_right = 145.0
|
margin_right = 145.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 19.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "0"
|
text = "0"
|
||||||
|
|
||||||
[node name="TimeCounter" type="Label" parent="HUD"]
|
[node name="TimeCounter" type="Label" parent="."]
|
||||||
margin_left = 1.0
|
margin_left = 1.0
|
||||||
margin_top = 178.0
|
margin_top = 179.0
|
||||||
margin_right = 57.0
|
margin_right = 57.0
|
||||||
margin_bottom = 198.0
|
margin_bottom = 199.0
|
||||||
theme = ExtResource( 10 )
|
theme = ExtResource( 10 )
|
||||||
text = "0:00:00"
|
text = "0:00:00"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue