You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onready var animationPlayer = $AnimationPlayer
onready var animationTree = $AnimationTree
onready var animationState = animationTree.get("parameters/playback")
func _ready():
animationTree.active = true
func _physics_process(delta):
match state:
MOVE:
move_state(delta)
is something wrong with:
extends KinematicBody2D
const MAX_SPEED = 80
const ACCELERATION = 500
const FRICTION = 500
enum {
MOVE,
ROLL,
ATTACK
}
var velocity = Vector2.ZERO
var state = MOVE
onready var animationPlayer = $AnimationPlayer
onready var animationTree = $AnimationTree
onready var animationState = animationTree.get("parameters/playback")
func _ready():
animationTree.active = true
func _physics_process(delta):
match state:
MOVE:
move_state(delta)
func move_state(delta):
var input_vector = Vector2.ZERO
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
input_vector = input_vector.normalized()
func attack_state(delta):
animationState.travel("Attack")
The text was updated successfully, but these errors were encountered: