Merge remote-tracking branch 'origin/demo'
This commit is contained in:
commit
377792c376
@ -664,14 +664,16 @@ func remove_prop_container() -> void:
|
|||||||
props_bag.remove_child(container)
|
props_bag.remove_child(container)
|
||||||
container.queue_free()
|
container.queue_free()
|
||||||
|
|
||||||
|
var invalid_sfx = preload("uid://dph8v3v5mq1xl")
|
||||||
|
|
||||||
func on_toggle_invalid_prop():
|
func on_toggle_invalid_prop(play_sfx := true):
|
||||||
if not inventory or not inventory.current_item_key():
|
if not inventory or not inventory.current_item_key():
|
||||||
return
|
return
|
||||||
|
|
||||||
if GlobalConfig.DEBUG:
|
if GlobalConfig.DEBUG:
|
||||||
print("使用无效道具. invalid_prop shake. current prop:", inventory.current_item_key())
|
print("使用无效道具. invalid_prop shake. current prop:", inventory.current_item_key())
|
||||||
|
if play_sfx:
|
||||||
|
invalid_sfx.play()
|
||||||
|
|
||||||
if shake_tween and shake_tween.is_running():
|
if shake_tween and shake_tween.is_running():
|
||||||
shake_tween.kill()
|
shake_tween.kill()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user