Fixed last issue
This commit is contained in:
parent
57c178716e
commit
b317693619
1 changed files with 3 additions and 3 deletions
|
|
@ -66,7 +66,7 @@ func switch(to: StringName, exit: bool = true):
|
|||
|
||||
switched_to.emit(current_state)
|
||||
|
||||
update_remotes.rpc(to)
|
||||
update_remotes.rpc(to,exit)
|
||||
|
||||
func drop():
|
||||
if slots.find_key(current_state) == "knife":
|
||||
|
|
@ -118,8 +118,8 @@ func return_to_previous(exit: bool = true):
|
|||
switch("knife", exit)
|
||||
|
||||
@rpc("authority","call_remote","reliable")
|
||||
func update_remotes(to: StringName):
|
||||
if current_state != null:
|
||||
func update_remotes(to: StringName,exit: bool):
|
||||
if current_state != null and exit:
|
||||
current_state.exit()
|
||||
current_state = slots[to]
|
||||
current_state.enter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue