Files
seeding-planets/entities/plants/scripts/texture_builder/plant_part.gd
2026-02-13 11:18:34 +01:00

27 lines
947 B
GDScript

extends Resource
class_name PlantPart
enum PartType {BASE_PART, BRANCH_PART, LEAF_PART, FLOWER_PART}
@export var texture: Texture
@export var root: Vector2
@export var attaches: Array[Vector2]
@export var bottom_attaches: Array[Vector2]
@export var type: PartType
@export var is_back: bool
@export var base_attachable: bool
@export var bottom_attachable: bool
@export var branch_attachable: bool
func init(textute_arg: Texture, root_arg: Vector2, attaches_arg: Array[Vector2], bottom_attaches_arg: Array[Vector2], type_arg: PartType, is_back_arg: bool, base_attachable_arg: bool, bottom_attachable_arg: bool, branch_attachable_arg: bool) -> void:
texture = textute_arg
root = root_arg
attaches = attaches_arg
bottom_attaches = bottom_attaches_arg
type = type_arg
is_back = is_back_arg
base_attachable = base_attachable_arg
bottom_attachable = bottom_attachable_arg
branch_attachable = branch_attachable_arg