feat: add tilesetMap; change simple grass probability in grass layer tiles;
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -12,9 +12,8 @@ func _ready() -> void:
|
|||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
var move_vector: Vector2 = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
|
var move_vector: Vector2 = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
|
||||||
velocity = move_vector * move_speed
|
velocity = move_vector * move_speed
|
||||||
if velocity == Vector2(0, 0):
|
|
||||||
$AnimatedSprite2D.stop()
|
if velocity.x > 0:
|
||||||
elif velocity.x > 0:
|
|
||||||
$AnimatedSprite2D.play("move_right")
|
$AnimatedSprite2D.play("move_right")
|
||||||
elif velocity.x < 0:
|
elif velocity.x < 0:
|
||||||
$AnimatedSprite2D.play("move_left")
|
$AnimatedSprite2D.play("move_left")
|
||||||
@@ -22,5 +21,6 @@ func _process(delta: float) -> void:
|
|||||||
$AnimatedSprite2D.play("move_down")
|
$AnimatedSprite2D.play("move_down")
|
||||||
elif velocity.y < 0:
|
elif velocity.y < 0:
|
||||||
$AnimatedSprite2D.play("move_up")
|
$AnimatedSprite2D.play("move_up")
|
||||||
|
else:
|
||||||
|
$AnimatedSprite2D.stop()
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|||||||
Reference in New Issue
Block a user