2022-08-04 18:05:48 -06:00
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
onready var sprite := $Sprite
|
|
|
|
|
|
|
|
|
|
|
|
const SpriteAsset = {bush1 = "bush1", bush2 = "bush2", tree = "tree", lamppost = "lamppost"}
|
|
|
|
export var SPRITE_ASSET := SpriteAsset.bush1
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
if SPRITE_ASSET in SpriteAsset:
|
2022-08-04 20:11:25 -06:00
|
|
|
sprite.texture = load("res://assets/%s.png" % SPRITE_ASSET)
|
2022-08-04 18:05:48 -06:00
|
|
|
else:
|
|
|
|
print("ERROR - Provided Sprite asset is either not defined or misspelled: %s FIXME %s" % [SPRITE_ASSET, self.name])
|
2022-08-04 20:11:25 -06:00
|
|
|
sprite.texture = load("res://assets/%s.png" % SpriteAsset.bush1)
|
2022-08-04 18:05:48 -06:00
|
|
|
|