Вопрос №1 по Godot: не работает анимация при ускорении (ВОПРОС РЕШЁН)

Аватар автора
Верстка для Стартапов
=== Question to the experts (professionals) of the Godot game engine: animation does not work when accelerating! === Друзья, если кто-то владеет нужной информацией по данному вопросу - пожалуйста, поделитесь, или выскажите своё мнение. Давайте помогать друг другу! == Friends, if someone owns the necessary information on this issue - please share, or express your opinion. Let&help each other! === Код плеера: extends KinematicBody2D script controll movements export var Speed = 100 export var Acc = 1.5 var motion = Vector2() func _physics_process(delta): if Input.is_action_pressed('ui_right'): motion.x = Speed $Sprite.flip_h = false $Sprite.play("run_midle") if Input.is_action_pressed('ui_home'): $Sprite.play("run_midle", false) motion.x = Speed*Acc $Sprite.flip_h = false $Sprite.play("run_i") #print(motion.x) elif Input.is_action_pressed('ui_left'): motion.x = -Speed $Sprite.flip_h = true $Sprite.play("run_midle") if Input.is_key_pressed(KEY_SHIFT): motion.x = -Speed*Acc else: motion.x = 0 $Sprite.play("stand_still") if Input.is_action_pressed('ui_up'): motion.y = -Speed $Sprite.play("run_midle") if Input.is_key_pressed(KEY_SHIFT): motion.y = -Speed*Acc elif Input.is_action_pressed('ui_down'): motion.y = Speed $Sprite.play("run_midle") if Input.is_key_pressed(KEY_SHIFT): motion.y = Speed*Acc else: motion.y = 0 move_and_slide(motion)

0/0


0/0

0/0

0/0

Скачать популярное видео

Популярное видео

0/0