Round system
This commit is contained in:
parent
bcb42f8d16
commit
3df8247a84
32 changed files with 573 additions and 123 deletions
|
|
@ -4,7 +4,8 @@ var plant: StringName
|
|||
|
||||
func _ready() -> void:
|
||||
if multiplayer.is_server():
|
||||
$Timer.timeout.connect(on_timeout)
|
||||
Session.bomb_timer.timeout.connect(on_timeout)
|
||||
Session.begin_bomb_stage()
|
||||
|
||||
func on_timeout():
|
||||
if multiplayer.is_server() == false:
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ func exit():
|
|||
machine.speed_modifier = 1.0
|
||||
|
||||
func on_animation_finished(animation: StringName):
|
||||
if is_multiplayer_authority() == false:
|
||||
return
|
||||
if animation == machine.animation_prefix + "plant":
|
||||
|
||||
Session.spawn({"scene": active_bomb, "position": machine.player_camera.get_parent().global_position,"plant": Session.get_site().name})
|
||||
|
|
@ -20,5 +22,7 @@ func on_animation_finished(animation: StringName):
|
|||
return_to_previous.emit()
|
||||
|
||||
func state_input(event: InputEvent) -> void:
|
||||
if is_multiplayer_authority() == false:
|
||||
return
|
||||
if event.is_action_released("plr_bomb"):
|
||||
transition.emit("Idle")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue