ending schmexyfications
This commit is contained in:
@@ -5,22 +5,31 @@ var level: int = 1
|
||||
var exp: int = 0
|
||||
var message: String = ""
|
||||
var is_win: bool = true
|
||||
var army: Dictionary = {}
|
||||
var totalBlud: float = 0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if is_win:
|
||||
$Enemy.hide()
|
||||
$WinningEnemy.hide()
|
||||
$DeadEnemy.show()
|
||||
$DeadEnemy.play("default")
|
||||
if !is_win:
|
||||
$WinningEnemy.show()
|
||||
$DeadEnemy.hide()
|
||||
$WinningEnemy.play("default")
|
||||
$Message.text = message
|
||||
$AmtKill.text = str(killcount)
|
||||
$AmtLvl.text = str(level)
|
||||
$AmtExp.text = str(exp)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
$TotalArmyComp/Separation/ArmyTotals/Bats/Control/AnimatedSprite2D.play("default")
|
||||
$TotalArmyComp/Separation/ArmyTotals/Wolves/Control/AnimatedSprite2D.play("default")
|
||||
$TotalArmyComp/Separation/ArmyTotals/Necromancers/Control/AnimatedSprite2D.play("default")
|
||||
$"TotalArmyComp/Separation/ArmyTotals/Pit Fiends/Control/AnimatedSprite2D".play("default")
|
||||
$TotalArmyComp/Separation/ArmyTotals/Bats/AmtBat.text = "0" if !army.has("Bat") else str(army["Bat"])
|
||||
$TotalArmyComp/Separation/ArmyTotals/Wolves/AmtWolves.text = "0" if !army.has("Wolf") else str(army["Wolf"])
|
||||
$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(totalBlud)
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
@@ -21,6 +21,8 @@ func _process(delta):
|
||||
func win_screen():
|
||||
var enemy = $Enemy
|
||||
var end = load("res://Scenes/ending.tscn").instantiate()
|
||||
end.totalBlud = player.totalBludGenerated
|
||||
end.army = player.allSpawnedMonsters
|
||||
end.killcount = enemy.killcount
|
||||
end.level = enemy.level
|
||||
end.exp = enemy.experience
|
||||
@@ -31,6 +33,8 @@ func win_screen():
|
||||
func lose_screen():
|
||||
var enemy = $Enemy
|
||||
var end = load("res://Scenes/ending.tscn").instantiate()
|
||||
end.totalBlud = player.totalBludGenerated
|
||||
end.army = player.allSpawnedMonsters
|
||||
end.killcount = enemy.killcount
|
||||
end.level = enemy.level
|
||||
end.exp = enemy.experience
|
||||
|
Reference in New Issue
Block a user