BING CHILLING FINALE FINALE COPY v2 4 real on god

This commit is contained in:
Victor Turgeon 2023-10-11 12:17:01 -04:00
parent 077ada5db4
commit 36f6c08f8b
4 changed files with 24 additions and 0 deletions

View File

@ -13,6 +13,7 @@ var currentCost : float = 0
var currentStateIcon : Texture2D = null
var allSpawnedMonsters : Dictionary = {}
var currentSpawnedMonsters : Array = []
var maxBludGen : float = 0
@onready var menuZone : Control = $Camera2D/CanvasLayer/PlayerUI/MenuZone
@onready var playerUI : Control = $Camera2D/CanvasLayer/PlayerUI
@onready var enemy : Fabio = $"../Enemy"
@ -48,6 +49,8 @@ func add_monster(monster : TemplateSpawnable):
currentSpawnedMonsters.append(monster)
currentBludGen += monster.BludGen
if currentBludGen > maxBludGen:
maxBludGen = currentBludGen
playerUI.set_blud_gen(currentBludGen)
if !allSpawnedMonsters.has(monster.monsterName):

View File

@ -784,6 +784,23 @@ texture = ExtResource("6_vbucy")
expand_mode = 3
stretch_mode = 5
[node name="MaxBludGen" type="HBoxContainer" parent="TotalArmyComp/Separation"]
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 0.25
[node name="BludGenLabel" type="Label" parent="TotalArmyComp/Separation/MaxBludGen"]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("4_br77t")
text = "Max Blood Gen: "
[node name="MaxBludGen" type="Label" parent="TotalArmyComp/Separation/MaxBludGen"]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("4_br77t")
text = "0/s"
[node name="AmtKill" type="Label" parent="."]
layout_mode = 0
offset_left = 144.0

View File

@ -8,6 +8,7 @@ var is_win: bool = true
var army: Dictionary = {}
var totalBlud: float = 0
var remainingTime: String = "0"
var maxBludGen = 0
func _ready():
if is_win:
@ -34,6 +35,7 @@ func _ready():
$TotalArmyComp/Separation/ArmyTotals/Necromancers/AmtNecromancer.text = "0" if !army.has("Necromancer") else str(army["Necromancer"])
$"TotalArmyComp/Separation/ArmyTotals/Pit Fiends/AmtPitFiend".text = "0" if !army.has("Pit Fiend") else str(army["Pit Fiend"])
$TotalArmyComp/Separation/TotalBludGen/AmtBlud.text = str(floor(totalBlud))
$TotalArmyComp/Separation/MaxBludGen/MaxBludGen.text = str(maxBludGen) + "/s"
func _on_quit_pressed():
get_tree().quit()

View File

@ -28,6 +28,7 @@ func win_screen():
end.level = enemy.level
end.exp = enemy.experience
end.message = "The holy knight Fabio is defeated, Evil has won and your magic staff is safe."
end.maxBludGen = player.maxBludGen
self.queue_free()
get_tree().root.add_child(end)
@ -41,6 +42,7 @@ func lose_screen():
end.exp = enemy.experience
end.is_win = false
end.message = "The holy knight Fabio destroyed you army of evil and left with your magic staff..."
end.maxBludGen = player.maxBludGen
self.queue_free()
get_tree().root.add_child(end)