Hand rework
This commit is contained in:
parent
52572f8c37
commit
6bfd3a3f0f
8 changed files with 118 additions and 40 deletions
30
systems/turn_schedule.gd
Normal file
30
systems/turn_schedule.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
extends Node
|
||||
|
||||
var current_team: TEAMS = TEAMS.Enemy
|
||||
var game_round: int = 0
|
||||
var turn: int = 0
|
||||
|
||||
func reset() -> void:
|
||||
current_team = TEAMS.Enemy
|
||||
|
||||
func advance() -> void:
|
||||
trigger_units.emit(current_team)
|
||||
current_team = clamp(current_team + 1,TEAMS.Player,TEAMS.Enemy)
|
||||
turn += 1
|
||||
if current_team == TEAMS.Player:
|
||||
game_round += 1
|
||||
turn = 0
|
||||
trigger_effects.emit()
|
||||
next_round.emit()
|
||||
next_turn.emit()
|
||||
|
||||
signal trigger_effects
|
||||
signal trigger_units(team: TEAMS)
|
||||
signal next_turn
|
||||
signal next_round
|
||||
|
||||
enum TEAMS {
|
||||
Player,
|
||||
Neutrals,
|
||||
Enemy
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue