Shop
This commit is contained in:
parent
06c5fea9bd
commit
cd20f952ce
6 changed files with 116 additions and 68 deletions
|
|
@ -71,6 +71,15 @@ func add(state: WeaponSubStateMachine, slot: StringName,ignore_parent: bool = fa
|
|||
ammo_updated.emit(current_state.ammo,current_state.remaining_ammo)
|
||||
state.enter.call_deferred()
|
||||
|
||||
func get_empty_ability_slot() -> StringName:
|
||||
if slots["ability_first"] == null:
|
||||
return "ability_first"
|
||||
elif slots["ability_second"] == null:
|
||||
return "ability_second"
|
||||
elif slots["ability_third"] == null:
|
||||
return "ability_third"
|
||||
return "ability_first"
|
||||
|
||||
@rpc("authority","call_remote","reliable")
|
||||
func switch(to: StringName, exit: bool = true):
|
||||
if slots.has(to) == false or slots[to] == null or slots[to] == current_state or (multiplayer.get_remote_sender_id() != 1 and is_multiplayer_authority() == false):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue