dd5b4bcae5
- adding coins (no shop jet) - adding skin changing [no gui jet - fixing loops for deleting stuff]
20 lines
322 B
GDScript
20 lines
322 B
GDScript
extends Sprite2D
|
|
|
|
signal screen_entered
|
|
|
|
var speed: float
|
|
|
|
func _ready() -> void:
|
|
pass
|
|
|
|
func _process(delta: float) -> void:
|
|
if $"/root/Global".gamerunning:
|
|
print("ahhhh")
|
|
global_position.x -= $"/root/Global".speed*delta
|
|
|
|
|
|
func screen_e() -> void:
|
|
screen_entered.emit()
|
|
|
|
func screen_exited() -> void:
|
|
queue_free()
|