mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-20 09:00:19 +02:00
Fixed the random position move state
This commit is contained in:
20
src/Boss/SlimeBoss/States/BossState.gd
Normal file
20
src/Boss/SlimeBoss/States/BossState.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends "res://Overlap/StateMachine/State.gd"
|
||||
|
||||
onready var animation_player = owner.get_node("AnimationPlayer")
|
||||
onready var animation_tree = owner.get_node("AnimationTree")
|
||||
onready var animation_playback = animation_tree.get("parameters/playback")
|
||||
|
||||
var _animation_type = ANIMATION_TYPE.TREE
|
||||
|
||||
enum ANIMATION_TYPE {
|
||||
PLAYER,
|
||||
TREE
|
||||
}
|
||||
|
||||
func set_animation_type(val):
|
||||
print("wow")
|
||||
_animation_type = val
|
||||
animation_player.playback_active = _animation_type == ANIMATION_TYPE.PLAYER
|
||||
animation_tree.active = _animation_type == ANIMATION_TYPE.TREE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user