diff options
| -rw-r--r-- | HUD.tscn | 28 | ||||
| -rw-r--r-- | Label2.gd | 20 | ||||
| -rw-r--r-- | Main.gd | 1 | ||||
| -rw-r--r-- | assets/MinecraftRegular-Bmg3.otf | bin | 0 -> 11016 bytes | |||
| -rw-r--r-- | assets/wordart(1).png | bin | 0 -> 738107 bytes | |||
| -rw-r--r-- | project.godot | 1 |
6 files changed, 48 insertions, 2 deletions
@@ -1,10 +1,13 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=12 format=2] [ext_resource path="res://HealthBar.gd" type="Script" id=1] [ext_resource path="res://Wordart.gd" type="Script" id=2] [ext_resource path="res://assets/wordart.png" type="Texture" id=3] [ext_resource path="res://assets/preview_4.tres" type="AudioStream" id=4] [ext_resource path="res://Money.gd" type="Script" id=5] +[ext_resource path="res://Label2.gd" type="Script" id=6] +[ext_resource path="res://assets/MinecraftRegular-Bmg3.otf" type="DynamicFontData" id=7] +[ext_resource path="res://assets/wordart(1).png" type="Texture" id=8] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0, 1, 0, 1 ) @@ -12,6 +15,12 @@ bg_color = Color( 0, 1, 0, 1 ) [sub_resource type="StyleBoxFlat" id=2] bg_color = Color( 0, 0, 0, 1 ) +[sub_resource type="DynamicFont" id=3] +size = 600 +outline_size = 50 +outline_color = Color( 0, 0, 0, 1 ) +font_data = ExtResource( 7 ) + [node name="HUD" type="CanvasLayer"] [node name="HBoxContainer" type="HBoxContainer" parent="."] @@ -53,11 +62,26 @@ text = "0" script = ExtResource( 5 ) [node name="Wordart" type="Sprite" parent="."] -position = Vector2( 626, 372 ) +position = Vector2( 626, 246 ) scale = Vector2( 0.171967, 0.186029 ) texture = ExtResource( 3 ) script = ExtResource( 2 ) +[node name="Wordart(1)" type="Sprite" parent="Wordart"] +position = Vector2( -488.465, 1451.39 ) +scale = Vector2( 0.639108, 0.832261 ) +texture = ExtResource( 8 ) + +[node name="Label" type="Label" parent="Wordart/Wordart(1)"] +margin_left = 3885.16 +margin_top = -219.604 +margin_right = 5987.16 +margin_bottom = 983.396 +custom_fonts/font = SubResource( 3 ) +text = "0 +" +script = ExtResource( 6 ) + [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="Wordart"] pause_mode = 2 stream = ExtResource( 4 ) diff --git a/Label2.gd b/Label2.gd new file mode 100644 index 0000000..b35e3a3 --- /dev/null +++ b/Label2.gd @@ -0,0 +1,20 @@ +extends Label + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +var score = 0 + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +func _on_coin_hit(): + score += 1 + self.text = str(score) +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass @@ -11,6 +11,7 @@ func _ready(): randomize() get_node("KinematicBody2D").connect("hit", get_node("HUD/HBoxContainer/HealthBar"), "_on_player_hit") get_node("KinematicBody2D").connect("coin", get_node("HUD/HBoxContainer/Money"), "_on_coin_hit") + get_node("KinematicBody2D").connect("coin", get_node("HUD/Wordart/Wordart(1)/Label"), "_on_coin_hit") $EnemySpawnTimer.start() diff --git a/assets/MinecraftRegular-Bmg3.otf b/assets/MinecraftRegular-Bmg3.otf Binary files differnew file mode 100644 index 0000000..54f08ad --- /dev/null +++ b/assets/MinecraftRegular-Bmg3.otf diff --git a/assets/wordart(1).png b/assets/wordart(1).png Binary files differnew file mode 100644 index 0000000..28b7aa8 --- /dev/null +++ b/assets/wordart(1).png diff --git a/project.godot b/project.godot index c209dd1..e078ed7 100644 --- a/project.godot +++ b/project.godot @@ -75,6 +75,7 @@ common/enable_pause_aware_picking=true [rendering] +quality/driver/driver_name="GLES2" vram_compression/import_etc=true vram_compression/import_etc2=false environment/default_environment="res://default_env.tres" |
