added income
This commit is contained in:
parent
0ae3a6be80
commit
80991aac9c
3 changed files with 8 additions and 1 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[sub_resource type="Resource" id="Resource_hxy0q"]
|
||||
script = ExtResource("1_yphdo")
|
||||
money = 130
|
||||
money = 95
|
||||
user_id = "144628425"
|
||||
username = "tabbyCatNya"
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ func _ready() -> void:
|
|||
createPlayers()
|
||||
spawn_shinies()
|
||||
load_userboard()
|
||||
Twitch.start_round()
|
||||
|
||||
func createPlayers():
|
||||
for i in range(8):
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ func create_new_player(id : String, name : String) -> PlayerData:
|
|||
save.player_database.append(player)
|
||||
return player
|
||||
|
||||
func start_round():
|
||||
for data in save.player_database:
|
||||
if data.money < 100:
|
||||
data.money = clampi(data.money + 5, 0, 100)
|
||||
|
||||
|
||||
func end_round(winning_character : int):
|
||||
current_winner = winning_character
|
||||
for data in save.player_database:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue