GodotSectors/Scripts/Space/SpaceSpawn.gd

19 lines
423 B
GDScript

extends SpaceEntity
## Position for mob to be spawned in.
##
class_name SpaceSpawn
class Desc extends RefCounted:
var position: Vector3
var rotation: Vector3
func get_spawn_desc(space: Space) -> Desc:
# todo: Get current region elevation
var desc := Desc.new()
desc.position = Vector3(global_position.x * space.unit_scale, 0, global_position.y * space.unit_scale)
desc.rotation.y = rotation_degrees
return desc