reloading and interaction. Started cleaning up player
This commit is contained in:
parent
d79db8a8d8
commit
daa83ce96d
2 changed files with 26 additions and 33 deletions
|
|
@ -39,35 +39,11 @@ func die() -> void:
|
|||
died.emit()
|
||||
passived = true
|
||||
|
||||
@rpc("any_peer","call_local","reliable")
|
||||
func passive() -> void:
|
||||
passived = true
|
||||
|
||||
@rpc("any_peer","call_local","reliable")
|
||||
func depassive() -> void:
|
||||
passived = false
|
||||
|
||||
@rpc("any_peer","call_local","reliable")
|
||||
func kill_request() -> void:
|
||||
if multiplayer.get_remote_sender_id() != 1:
|
||||
return
|
||||
|
||||
die()
|
||||
|
||||
@rpc("any_peer","call_local","reliable")
|
||||
func set_after_spawn(start_position: Vector3,new_team: int):
|
||||
global_position = start_position
|
||||
team = new_team as Session.TEAMS
|
||||
spawned.emit()
|
||||
|
||||
@rpc("any_peer","call_local","reliable")
|
||||
func take_damage(damage: int):
|
||||
hp -= damage
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if not is_multiplayer_authority():
|
||||
return
|
||||
if event.is_action_pressed("plr_interact"):
|
||||
Session.interact()
|
||||
if event.is_action_released("plr_interact"):
|
||||
Session.stop_interact()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue