aboutsummaryrefslogtreecommitdiffstats
path: root/godot
diff options
context:
space:
mode:
Diffstat (limited to 'godot')
-rw-r--r--godot/assets/fonts/default_dynamicfont.tres7
-rw-r--r--godot/assets/fonts/default_dynamicfontdata.tres4
-rw-r--r--godot/scenes/Die.gd14
-rw-r--r--godot/scenes/Die.tscn32
4 files changed, 54 insertions, 3 deletions
diff --git a/godot/assets/fonts/default_dynamicfont.tres b/godot/assets/fonts/default_dynamicfont.tres
new file mode 100644
index 0000000..a2da028
--- /dev/null
+++ b/godot/assets/fonts/default_dynamicfont.tres
@@ -0,0 +1,7 @@
+[gd_resource type="DynamicFont" load_steps=2 format=2]
+
+[ext_resource path="res://assets/fonts/default_dynamicfontdata.tres" type="DynamicFontData" id=1]
+
+[resource]
+size = 50
+font_data = ExtResource( 1 )
diff --git a/godot/assets/fonts/default_dynamicfontdata.tres b/godot/assets/fonts/default_dynamicfontdata.tres
new file mode 100644
index 0000000..a952151
--- /dev/null
+++ b/godot/assets/fonts/default_dynamicfontdata.tres
@@ -0,0 +1,4 @@
+[gd_resource type="DynamicFontData" format=2]
+
+[resource]
+font_path = "res://assets/fonts/format.otf"
diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd
index 121f27d..b6b9b9e 100644
--- a/godot/scenes/Die.gd
+++ b/godot/scenes/Die.gd
@@ -240,9 +240,20 @@ func ball_revert():
$BallShape.set_process(false)
$BallShape.disabled = true
-
+func buff_text():
+ match curr_buff:
+ buff.ball:
+ return ""
+ buff.bounce:
+ return "You're bouncy!"
+ buff.phase:
+ return "WooOOoOO you can phase through walls"
+ buff.gravity:
+ return "Warning, Low gravity!"
+ return ""
func revert_current_buff():
+ $PowerUI/LabelBuff.text = ""
match curr_buff:
buff.ball:
ball_revert()
@@ -254,6 +265,7 @@ func revert_current_buff():
low_gravity_revert()
func apply_buff():
+ $PowerUI/LabelBuff.text = buff_text()
match curr_buff:
buff.ball:
ball()
diff --git a/godot/scenes/Die.tscn b/godot/scenes/Die.tscn
index 8a85207..69727f1 100644
--- a/godot/scenes/Die.tscn
+++ b/godot/scenes/Die.tscn
@@ -1,8 +1,10 @@
-[gd_scene load_steps=10 format=2]
+[gd_scene load_steps=15 format=2]
[ext_resource path="res://scenes/Die.gd" type="Script" id=1]
[ext_resource path="res://assets/game_objects/W8baseColor_Mat.material" type="Material" id=2]
[ext_resource path="res://assets/textures/circles.png" type="Texture" id=3]
+[ext_resource path="res://assets/fonts/default_dynamicfont.tres" type="DynamicFont" id=4]
+[ext_resource path="res://assets/fonts/default_dynamicfontdata.tres" type="DynamicFontData" id=5]
[sub_resource type="PhysicsMaterial" id=7]
friction = 0.0
@@ -32,6 +34,18 @@ surfaces/0 = {
[sub_resource type="SphereShape" id=6]
radius = 0.1
+[sub_resource type="DynamicFont" id=8]
+size = 35
+font_data = ExtResource( 5 )
+
+[sub_resource type="Theme" id=9]
+ProgressBar/fonts/font = SubResource( 8 )
+
+[sub_resource type="Theme" id=10]
+Label/colors/font_color = Color( 0.933333, 0.654902, 0.0666667, 1 )
+Label/colors/font_color_shadow = Color( 0, 0, 0, 1 )
+Label/fonts/font = ExtResource( 4 )
+
[node name="Die" type="RigidBody"]
collision_layer = 3
collision_mask = 3
@@ -147,7 +161,21 @@ margin_bottom = 40.0
margin_left = 64.0
margin_top = 44.0
margin_right = 1185.0
-margin_bottom = 153.0
+margin_bottom = 113.0
+theme = SubResource( 9 )
+
+[node name="LabelBuff" type="Label" parent="PowerUI"]
+anchor_left = 0.689
+anchor_top = 0.068
+anchor_right = 0.914
+anchor_bottom = 0.081
+margin_left = -30.0
+margin_top = -30.0
+margin_right = 30.0
+margin_bottom = 30.0
+theme = SubResource( 10 )
+align = 2
+valign = 1
[node name="PowerUI3D" type="Spatial" parent="."]