Skip to content

Commit

Permalink
Simplified update_labels() in country.
Browse files Browse the repository at this point in the history
  • Loading branch information
ra314 committed Aug 5, 2021
1 parent 2b4f387 commit 86a3eb8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Scripts/Levels/Level Components/Country.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ func change_ownership_to(player):
get_node("Sprite").change_color_to("gray")

func update_labels():
# Level Creator Behaviour
if get_tree().get_current_scene().get_name() == "Level Creator":
get_node("Label").text = str(num_troops)
return
get_node("Label").text = str(num_troops)
if belongs_to:
belongs_to.update_labels()
Expand Down Expand Up @@ -173,6 +169,7 @@ func randomise_troops():
num_troops = 3
elif rand_num < 10:
num_troops = 4
update_labels()

func init(_x, _y, _country_name):
position = Vector2(_x, _y)
Expand Down

0 comments on commit 86a3eb8

Please sign in to comment.