dd5b4bcae5
- adding coins (no shop jet) - adding skin changing [no gui jet - fixing loops for deleting stuff]
17 lines
403 B
GDScript
17 lines
403 B
GDScript
extends CharacterBody2D
|
|
|
|
@onready var speed = 0
|
|
|
|
|
|
func _ready() -> void:
|
|
$"Sprite".frame_coords.x = randi_range(0,4)
|
|
if $"/root/Global".active_biom == "w":
|
|
$"Sprite".frame_coords.y = 1
|
|
elif $"/root/Global".active_biom == "s":
|
|
$"Sprite".frame_coords.y = 2
|
|
else:
|
|
$"Sprite".frame_coords.y = 0
|
|
|
|
func _process(delta: float) -> void:
|
|
speed = $"/root/Global".speed
|
|
global_position.x -= speed*delta
|