Added bat enemies with stats and better touch controls
This commit is contained in:
@@ -20,9 +20,11 @@ var state = MOVE
|
||||
onready var animationPlayer = $AnimationPlayer
|
||||
onready var animationTree = $AnimationTree
|
||||
onready var animationState = animationTree.get("parameters/playback")
|
||||
onready var swordHitbox = $HitboxPivot/SwordHitbox
|
||||
|
||||
func _ready():
|
||||
animationTree.active = true
|
||||
swordHitbox.knockback_vector = roll_vector
|
||||
|
||||
func _process(delta):
|
||||
match state:
|
||||
@@ -42,6 +44,7 @@ func move_state(delta):
|
||||
|
||||
if input_vector != Vector2.ZERO:
|
||||
roll_vector = input_vector
|
||||
swordHitbox.knockback_vector = input_vector
|
||||
animationTree.set("parameters/Idle/blend_position", input_vector)
|
||||
animationTree.set("parameters/Run/blend_position", input_vector)
|
||||
animationTree.set("parameters/Attack/blend_position", input_vector)
|
||||
|
||||
Reference in New Issue
Block a user