#28 tiled 数据解析与渲染

This commit is contained in:
yhh
2020-08-13 17:39:24 +08:00
parent e5805960e0
commit b0511db001
23 changed files with 2586 additions and 638 deletions

View File

@@ -8,13 +8,15 @@ module es {
public offsetY: number;
public color: number;
public drawOrder: DrawOrderType;
public objects: TmxList<TmxObject>;
public objects: TmxObject[];
public properties: Map<string, string>;
}
export class TmxObject implements ITmxElement {
public id: number;
public name: string;
public shape: egret.Shape;
public textField: egret.TextField;
public objectType: TmxObjectType;
public type: string;
public x: number;
@@ -27,6 +29,11 @@ module es {
public text: TmxText;
public points: Vector2[];
public properties: Map<string, string>;
constructor(){
this.shape = new egret.Shape();
this.textField = new egret.TextField();
}
}
export class TmxText {