bring-inc-prototype/Source/scripts/city.gd

8 lines
248 B
GDScript3
Raw Normal View History

2022-01-27 21:44:45 +01:00
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