This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
odyssey-old/Actors/Meta/POI/POI.gd

37 lines
537 B
GDScript

tool
extends Node2D
class_name POI
enum POIType {
Null,
SpawnPoint
}
enum POIClass {
Null,
Player
}
export(POIType) var poitype = POIType.Null
export(POIClass) var poiclass = POIClass.Null
func _draw():
if Engine.editor_hint:
match poitype:
POIType.SpawnPoint:
match poiclass:
POIClass.Player:
draw_arc(Vector2.ZERO, 10, 0, PI*2, 16, Color.red, 2)
func serialize():
return {
"poitype": poitype,
"poiclass": poiclass
}
func deserialize(data):
poitype = data["poitype"]
poiclass = data["poiclass"]