From 16caafa366fa0c666e12f4891ea839f5cd321a64 Mon Sep 17 00:00:00 2001 From: kts of kettek Date: Sun, 30 Jan 2022 03:22:46 -0800 Subject: [PATCH] Handle trigger and event zone --- Engine/src/data/segment.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Engine/src/data/segment.ts b/Engine/src/data/segment.ts index c38abf6..d10aa55 100644 --- a/Engine/src/data/segment.ts +++ b/Engine/src/data/segment.ts @@ -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' }