immersive-home/lib/stores/house.gd

31 lines
483 B
GDScript3
Raw Normal View History

2024-01-25 17:29:33 +02:00
extends StoreClass
const StoreClass = preload("./store.gd")
# Type Room
# name: String
# corners: Vec2[]
# height: float
var rooms = []
# Type Entity
# id: String
# position: Vec3
# rotation: Vec3
# room: String
var entities = []
var align_position1: Vector3
var align_position2: Vector3
func _init():
_save_path = "user://house.json"
func clear():
2024-01-29 16:35:58 +02:00
rooms = []
entities = []
2024-01-25 17:29:33 +02:00
func get_room(name):
for room in rooms:
if room.name == name:
return room
return null