Commit 0b3cd22b authored by horle's avatar horle
Browse files

merge

parents b7b70476 10ba6900
......@@ -66,11 +66,21 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="NextRound" type="Button" parent="RoundControl"]
[node name="ShroomKillsLeft" type="Label" parent="RoundControl"]
margin_left = -10.1604
margin_top = 59.8185
margin_right = 75.8396
margin_bottom = 79.8185
margin_bottom = 73.8185
align = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="NextRound" type="Button" parent="RoundControl"]
margin_left = -10.1604
margin_top = 99.8185
margin_right = 75.8396
margin_bottom = 119.818
text = "Next Round"
__meta__ = {
"_edit_use_anchors_": false
......
......@@ -30,6 +30,7 @@ public class RoundControlAndDisplay : Node2D
_Instance = this;
shroomKills = maxShroomKills;
timeoutLeft = roundTimeout;
GetNode<Label>("ShroomKillsLeft").Text = "Kills left: " + shroomKills;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
......@@ -74,6 +75,7 @@ public class RoundControlAndDisplay : Node2D
public void killShroom() {
shroomKills--;
GetNode<Label>("ShroomKillsLeft").Text = "Kills left: " + shroomKills;
}
private void AdvanceRound()
......@@ -108,7 +110,18 @@ public class RoundControlAndDisplay : Node2D
private void HandleGameover()
{
TileMap tileMap = (TileMap)GetParent().GetNode<TileMap>("TileMap");
MapData mapData = tileMap.mapInstance;
GetParent().GetNode<Node2D>("GameoverScreen").Visible = true;
// if(true)
// {
// GetParent().GetNode<RichTextLabel>("GameoverScreen/TopText").BbcodeText = "[center]YOU WON![/center]";
// }
// else
// {
// GetParent().GetNode<RichTextLabel>("GameoverScreen/TopText").BbcodeText = "[center]YOU LOST[/center]";
// }
GetTree().Paused = true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment