GodotSectors/Scripts/Space/SpaceSpawn.gd

19 lines
423 B
GDScript3
Raw Normal View History

extends SpaceEntity
## Position for mob to be spawned in.
##
class_name SpaceSpawn
2024-08-02 02:12:13 +00:00
class Desc extends RefCounted:
var position: Vector3
var rotation: Vector3
func get_spawn_desc(space: Space) -> Desc:
# todo: Get current region elevation
2024-08-02 02:12:13 +00:00
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