Handle trigger and event zone
This commit is contained in:
parent
c32fdba2f1
commit
16caafa366
|
@ -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'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user