retrace/Characters/Player/PillTaker.gd
incredibleLeitman 3cfd698276 added nose for Meldewesen for easier debugging
set Min Pill level to 1 -> otherwise collisions seems to stop working
changed Meldewesen behavior: only "catch" player if is in forbidden Area, otherwise just following
2019-12-27 18:10:09 +01:00

16 lines
391 B
GDScript

extends Spatial
var _animation: AnimationPlayer
func _ready():
_animation = get_parent().get_node("PillAnimationPlayer") as AnimationPlayer
assert(null != _animation)
func _process(delta):
# Taking a pill
if Input.is_action_just_pressed("take_pill"):
Pills.take_pill()
#Logger.info("Player took a pill, new level: %s" % [Pills.get_round_level()])
_animation.play("PillTaking")