Players shouldn't be allowed to shoot during buy phase

This commit is contained in:
Rendo 2025-12-12 01:48:28 +05:00
commit e8af70b198

View file

@ -184,17 +184,25 @@ func _physics_process(delta: float) -> void:
current_state.physics_update(delta) current_state.physics_update(delta)
func use_begin() -> void: func use_begin() -> void:
if Session.round_state == Session.ROUND_STATES.BUY:
return
if current_state != null: if current_state != null:
current_state.use_begin() current_state.use_begin()
func use_end() -> void: func use_end() -> void:
if Session.round_state == Session.ROUND_STATES.BUY:
return
if current_state != null: if current_state != null:
current_state.use_end() current_state.use_end()
func alternate_state() -> void: func alternate_state() -> void:
if Session.round_state == Session.ROUND_STATES.BUY:
return
if current_state != null: if current_state != null:
current_state.alternate_state() current_state.alternate_state()
func switch_mode() -> void: func switch_mode() -> void:
if Session.round_state == Session.ROUND_STATES.BUY:
return
if current_state != null: if current_state != null:
current_state.switch_mode() current_state.switch_mode()