-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Exit Button functional exit button, early skeleton of showing the values of prompts * Temp Changes my json file/dialogue stuff isn't fully updated, pushing this for stability * Context Values Functional Context values update as you collect more fruits * Developer Mode Basics Made the updating hud only accessible under developer mode. * Dev Mode added the ability to see hitboxes, and fixed issue with the toggle button * Added more mobs for sillies
- Loading branch information
Showing
13 changed files
with
226 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
extends Label | ||
|
||
var JSON_URL = "res://DialogueManager/dialogues.json" | ||
|
||
#sets the rain state right away, doesn't need to be constantly updated | ||
func _ready(): | ||
if(DialogueDatabase.rainState == 0): | ||
$RainState.text = str("No Rain") | ||
elif(DialogueDatabase.rainState == 1): | ||
$RainState.text = str("Light Rain") | ||
else: | ||
$RainState.text = str("Heavy Rain") | ||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
# using this to have a constant update to the values as I do not fully know how to update only when a prompt is changed | ||
func _process(delta): | ||
$Health.text = str(DialogueManager.game_context["health"]) | ||
$Hunger.text = str(DialogueManager.game_context["hunger"]) | ||
$TotalApple.text = str(DialogueManager.game_context["total_apple"]) | ||
$TotalBanana.text = str(DialogueManager.game_context["total_banana"]) | ||
$TotalWatermelon.text = str(DialogueManager.game_context["total_watermelon"]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://cvhu1xm2ecqne"] | ||
|
||
[ext_resource type="Script" path="res://Scenes/ShowDialogueHUD.gd" id="1_prukx"] | ||
[ext_resource type="FontFile" uid="uid://dg5ck0bgmm7yp" path="res://Assets/PixelifySans-Regular.ttf" id="1_sw1ca"] | ||
[ext_resource type="Script" path="res://Scenes/ShowHud.gd" id="1_vg2at"] | ||
|
||
[node name="ShowDialogueHUD" type="CanvasLayer"] | ||
script = ExtResource("1_vg2at") | ||
|
||
[node name="ColorRect" type="ColorRect" parent="."] | ||
anchors_preset = -1 | ||
anchor_right = 0.224 | ||
anchor_bottom = 0.292 | ||
offset_right = -0.0160065 | ||
offset_bottom = -0.0720062 | ||
color = Color(1, 1, 1, 0.313726) | ||
|
||
[node name="NamesOfContexts" type="Label" parent="."] | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
offset_right = -299.0 | ||
offset_bottom = -150.0 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_sw1ca") | ||
theme_override_font_sizes/font_size = 7 | ||
text = "hunger: | ||
health: | ||
total_apple: | ||
total_banana: | ||
total_watermelon: | ||
rain_state:" | ||
autowrap_mode = 2 | ||
script = ExtResource("1_prukx") | ||
|
||
[node name="Hunger" type="Label" parent="NamesOfContexts"] | ||
layout_mode = 1 | ||
anchors_preset = -1 | ||
anchor_right = 4.518 | ||
anchor_bottom = 3.273 | ||
offset_left = 28.0 | ||
offset_right = -299.03 | ||
offset_bottom = -205.018 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_sw1ca") | ||
theme_override_font_sizes/font_size = 7 | ||
text = "0" | ||
autowrap_mode = 2 | ||
|
||
[node name="Health" type="Label" parent="NamesOfContexts"] | ||
layout_mode = 1 | ||
anchors_preset = -1 | ||
anchor_right = 4.518 | ||
anchor_bottom = 3.273 | ||
offset_left = 26.0 | ||
offset_top = 11.0 | ||
offset_right = -299.03 | ||
offset_bottom = -183.018 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_sw1ca") | ||
theme_override_font_sizes/font_size = 7 | ||
text = "0 | ||
" | ||
|
||
[node name="TotalApple" type="Label" parent="NamesOfContexts"] | ||
layout_mode = 1 | ||
anchors_preset = -1 | ||
anchor_right = 4.518 | ||
anchor_bottom = 3.273 | ||
offset_left = 45.0 | ||
offset_top = 21.0 | ||
offset_right = -299.03 | ||
offset_bottom = -174.018 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_sw1ca") | ||
theme_override_font_sizes/font_size = 6 | ||
text = "0" | ||
|
||
[node name="TotalBanana" type="Label" parent="NamesOfContexts"] | ||
layout_mode = 1 | ||
anchors_preset = -1 | ||
anchor_right = 4.518 | ||
anchor_bottom = 3.273 | ||
offset_left = 51.0 | ||
offset_top = 31.0 | ||
offset_right = -299.637 | ||
offset_bottom = -163.018 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_sw1ca") | ||
theme_override_font_sizes/font_size = 7 | ||
text = "0" | ||
|
||
[node name="TotalWatermelon" type="Label" parent="NamesOfContexts"] | ||
layout_mode = 1 | ||
anchors_preset = -1 | ||
anchor_right = 4.518 | ||
anchor_bottom = 3.273 | ||
offset_left = 66.0 | ||
offset_top = 42.0 | ||
offset_right = -299.03 | ||
offset_bottom = -163.018 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_sw1ca") | ||
theme_override_font_sizes/font_size = 7 | ||
text = "0" | ||
|
||
[node name="RainState" type="Label" parent="NamesOfContexts"] | ||
layout_mode = 1 | ||
anchors_preset = -1 | ||
anchor_right = 4.518 | ||
anchor_bottom = 3.273 | ||
offset_left = 41.0 | ||
offset_top = 51.0 | ||
offset_right = -301.03 | ||
offset_bottom = -154.018 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_sw1ca") | ||
theme_override_font_sizes/font_size = 7 | ||
text = "0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends CanvasLayer | ||
|
||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
if(DialogueDatabase.developer_mode != 1): | ||
hide() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
extends CanvasLayer | ||
|
||
#pretty self explanitory(quits code) | ||
func _on_button_pressed(): | ||
get_tree().quit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://c7di5npf3casw"] | ||
|
||
[ext_resource type="Script" path="res://Scenes/UI/ExitGameButton.gd" id="1_ajcr2"] | ||
[ext_resource type="FontFile" uid="uid://dg5ck0bgmm7yp" path="res://Assets/PixelifySans-Regular.ttf" id="1_dd0oi"] | ||
|
||
[node name="ExitGameButton" type="CanvasLayer"] | ||
script = ExtResource("1_ajcr2") | ||
|
||
[node name="Button" type="Button" parent="."] | ||
anchors_preset = -1 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
offset_left = 335.0 | ||
offset_top = 199.0 | ||
offset_right = -1.0 | ||
offset_bottom = -1.0 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_fonts/font = ExtResource("1_dd0oi") | ||
theme_override_font_sizes/font_size = 7 | ||
text = "CLOSE GAME" | ||
|
||
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters