shard titles pop up in game
This commit is contained in:
parent
a13a9cee10
commit
afa641901c
10 changed files with 108 additions and 8 deletions
|
@ -32,6 +32,17 @@ func _ready():
|
|||
tween.tween_interval(3.0)
|
||||
tween.tween_property(music, "rect_position:x", 256.0, 1.0)
|
||||
|
||||
func shard_popup(shard_number):
|
||||
#Change text to song name
|
||||
var shard_title = $ShardTitle
|
||||
var level = LevelData.levels[Game.current_level]
|
||||
shard_title.text = "§" + str(level.shard_titles[shard_number])
|
||||
yield(get_tree(), "idle_frame")
|
||||
var tween = create_tween()
|
||||
tween.tween_property(shard_title, "rect_position:x", 254.0 - shard_title.rect_size.x, 1.0)
|
||||
tween.tween_interval(3.0)
|
||||
tween.tween_property(shard_title, "rect_position:x", 256.0, 1.0)
|
||||
|
||||
func _physics_process(delta):
|
||||
#Gold Counter
|
||||
gold_counter.text = "%02d" % Game.keys
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=13 format=2]
|
||||
[gd_scene load_steps=14 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/hud/stars_hud.png" type="Texture" id=1]
|
||||
[ext_resource path="res://graphics/hud/lives_head.png" type="Texture" id=2]
|
||||
|
@ -8,17 +8,21 @@
|
|||
[ext_resource path="res://objects/hud/hud.gd" type="Script" id=6]
|
||||
[ext_resource path="res://graphics/hud/key_counter.png" type="Texture" id=7]
|
||||
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=8]
|
||||
[ext_resource path="res://ui/2ndpuberty_no_dropshadow.tres" type="Theme" id=9]
|
||||
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=9]
|
||||
[ext_resource path="res://ui/theme.tres" type="Theme" id=10]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=2]
|
||||
|
||||
[node name="HUD" type="CanvasLayer"]
|
||||
[sub_resource type="ShaderMaterial" id=3]
|
||||
shader = ExtResource( 9 )
|
||||
shader_param/border_color = Color( 0.219608, 0.219608, 0.219608, 1 )
|
||||
shader_param/border_corners = true
|
||||
|
||||
[node name="HUD" type="CanvasLayer" groups=["hud"]]
|
||||
layer = 100
|
||||
script = ExtResource( 6 )
|
||||
song_name = "♫Music"
|
||||
bonus_color = Color( 0.478431, 1, 0.47451, 1 )
|
||||
|
||||
[node name="Back" type="Sprite" parent="."]
|
||||
|
@ -156,6 +160,16 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
margin_top = -10.0
|
||||
margin_right = 42.0
|
||||
theme = ExtResource( 9 )
|
||||
theme = ExtResource( 10 )
|
||||
text = "♫Music"
|
||||
align = 2
|
||||
|
||||
[node name="ShardTitle" type="Label" parent="."]
|
||||
material = SubResource( 3 )
|
||||
margin_left = 256.0
|
||||
margin_top = 182.0
|
||||
margin_right = 333.0
|
||||
margin_bottom = 192.0
|
||||
theme = ExtResource( 10 )
|
||||
text = "§time bonus"
|
||||
align = 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue