Handle trigger and event zone

This commit is contained in:
Ketchetwahmeegwun T. Southall 2022-01-30 03:22:46 -08:00
parent c32fdba2f1
commit 16caafa366

View File

@ -71,7 +71,8 @@ export class SegmentDecoration {
export class SegmentZone {
uuid: string
points: [number, number][] = []
type: 'solid'|'fluid'
type: 'solid'|'fluid'|'trigger'
event: string = ''
constructor(o: any) {
this.uuid = o.uuid
this.points = o.points.map((v: any) => {
@ -79,6 +80,9 @@ export class SegmentZone {
})
if (o.data.type === 'fluid') {
this.type = o.data.type
} else if (o.data.type === 'trigger') {
this.type = 'trigger'
this.event = o.data.event
} else {
this.type = 'solid'
}