df81023ae263b6e07b4c107fe06fc4b1b6f30804 1.3 KB

12345678
  1. {
  2. "code": "var Vector3 = Laya.Vector3;\r\nimport PoolManager from \"../Util/PoolManager\";\r\nimport { AssetManager } from \"./AssetManager\";\r\nexport var buildtype;\r\n(function (buildtype) {\r\n buildtype[buildtype[\"barrier\"] = 0] = \"barrier\";\r\n buildtype[buildtype[\"stand\"] = 1] = \"stand\";\r\n buildtype[buildtype[\"road\"] = 2] = \"road\";\r\n})(buildtype || (buildtype = {}));\r\nexport class builddata {\r\n constructor(_type, _id, _pos) {\r\n this.type = _type;\r\n this.buildid = _id;\r\n this.startpos = new Vector3(_pos.x, _pos.y, _pos.z);\r\n this.starteroty = _pos.w;\r\n }\r\n}\r\nexport class Building {\r\n constructor() {\r\n this.clear = false;\r\n }\r\n Init(_data) {\r\n this.mdata = _data;\r\n var buildasset = AssetManager.BuildAsset(this.mdata.type, _data.buildid);\r\n this.cursprite = PoolManager.GetSprite3D(buildasset);\r\n }\r\n OnInit() { }\r\n ;\r\n OnClear() { }\r\n ;\r\n Clear() {\r\n if (this.clear)\r\n return;\r\n this.clear = true;\r\n this.OnClear();\r\n this.cursprite.destroy();\r\n }\r\n}\r\n",
  3. "references": [
  4. "D:/Work/samurai2-laya/laya/samuraiflash-tt/src/Util/PoolManager.ts",
  5. "D:/Work/samurai2-laya/laya/samuraiflash-tt/src/Main/AssetManager.ts"
  6. ]
  7. }