Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HaSi-Gamejam 2021
Pando
Commits
0b3cd22b
Commit
0b3cd22b
authored
Apr 11, 2021
by
horle
Browse files
merge
parents
b7b70476
10ba6900
Changes
2
Hide whitespace changes
Inline
Side-by-side
scenes/map.tscn
View file @
0b3cd22b
...
...
@@ -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
...
...
scripts/RoundControlAndDisplay.cs
View file @
0b3cd22b
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment