plant-builder working

This commit is contained in:
Altaezio
2026-02-24 14:28:24 +01:00
parent d28e734806
commit 981965d8c7
62 changed files with 561 additions and 773 deletions

View File

@@ -4,14 +4,20 @@ class_name PlantPart
enum PartType {BASE_PART, BRANCH_PART, LEAF_PART, FLOWER_PART}
@export var texture: Texture
@export var image: Image
@export var type: PartType
@export var root: PlantAttach
@export var attaches: Array[PlantAttach] # array of vec2
var image: Image: get = get_image
func init(textute_arg: Texture, type_arg: PartType, root_arg: PlantAttach, attaches_arg: Array[PlantAttach]) -> void:
texture = textute_arg
image = texture.get_image()
type = type_arg
root = root_arg
attaches = attaches_arg
func get_image():
if image == null:
image = texture.get_image()
return image