8 lines
248 B
GDScript3
8 lines
248 B
GDScript3
|
extends KinematicBody2D
|
||
|
|
||
|
func _ready():
|
||
|
get_node("sprite").texture = load("res://sprites/cities/city"+str(randi()%11).pad_zeros(2)+".png")
|
||
|
|
||
|
func radius():
|
||
|
return get_node("sprite").texture.get_width()*get_node("sprite").transform.get_scale().x/2
|