Add activation animation to Dungee
This commit is contained in:
parent
383e868b2b
commit
8d0ed8c98f
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -69,6 +69,8 @@ func modify_inventory(item_name, item_amount):
|
|||||||
|
|
||||||
func _unhandled_input(event):
|
func _unhandled_input(event):
|
||||||
if event.is_action_pressed("action"):
|
if event.is_action_pressed("action"):
|
||||||
|
$DungMan/AnimationTree["parameters/Activate/active"] = true
|
||||||
|
yield(get_tree().create_timer(0.2), "timeout")
|
||||||
for area in $"%TriggerVolume".get_overlapping_areas():
|
for area in $"%TriggerVolume".get_overlapping_areas():
|
||||||
if try_trigger_interact(area):
|
if try_trigger_interact(area):
|
||||||
break
|
break
|
||||||
@ -82,6 +84,7 @@ func try_trigger_interact(area):
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
var result = owner.on_player_interact(self)
|
var result = owner.on_player_interact(self)
|
||||||
|
|
||||||
if not result:
|
if not result:
|
||||||
print("player failed to interacted with ", owner)
|
print("player failed to interacted with ", owner)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user