{
  "code": "import { Runner } from \"./Runner\";\r\nimport PoolManager from \"./PoolManager\";\r\nimport { ResourcesManager } from \"./ResourcesManager\";\r\nimport { ScenceManager } from \"./ScenceManager\";\r\nvar Vector3 = Laya.Vector3;\r\nvar Vector4 = Laya.Vector4;\r\nimport { GameUtils } from \"../../GameUtils/GameUtils\";\r\nimport { Queue } from \"./Queue\";\r\nimport { LevelManager } from \"./LevelManager\";\r\nexport class AImanager {\r\n    constructor() {\r\n        this.m_aiNum = 5;\r\n        this.m_aiList = [];\r\n        this.randombodycolor = [\r\n            new Vector4(0.25, 0.5, 1, 1),\r\n            new Vector4(0.5, 0.25, 1, 1),\r\n            new Vector4(1, 0.25, 1, 1),\r\n            new Vector4(1, 0.25, 0.5, 1),\r\n        ];\r\n        AImanager.instance = this;\r\n    }\r\n    static get Instance() {\r\n        if (AImanager.instance) {\r\n            return AImanager.instance;\r\n        }\r\n        else {\r\n            return new AImanager();\r\n        }\r\n    }\r\n    CreatAi() {\r\n        var level = LevelManager.Instance.curLevel;\r\n        for (var i = 0; i < this.m_aiNum; i++) {\r\n            var res = ResourcesManager.Instance.roleassets;\r\n            var spr = res[GameUtils.getRandomInt(1, 6)].getChildAt(0);\r\n            var model = PoolManager.Instance.CreatMeshSprite3D(spr, \"\");\r\n            ScenceManager.Instance.GameScence.addChild(model);\r\n            var startpoint = new Vector3(-1.4 + (i * 0.7), 0, 13);\r\n            model.transform.position = startpoint;\r\n            var runner = model.addComponent(Runner);\r\n            runner.Ai = true;\r\n            runner.m_speed = GameUtils.getRandoms(-0.03, 0.02) + level.npcspeed;\r\n            runner.aioffestx = GameUtils.getRandoms(-0.001, 0.001);\r\n            runner.Id = i;\r\n            runner.name = \"草莓\" + (runner.Id + 1) + \"号\";\r\n            runner.aimiss = level.NPCmiss;\r\n            this.m_aiList.push(runner);\r\n            Queue.Instance.signup(runner);\r\n        }\r\n    }\r\n    ClearAis() {\r\n        for (var i = 0; i < this.m_aiList.length; i++) {\r\n            if (this.m_aiList[i].m_sprite.active) {\r\n                this.m_aiList[i].m_flySprite.active = true;\r\n                this.m_aiList[i].m_crown.active = true;\r\n                PoolManager.Instance.RecoverMeshSprite3D(this.m_aiList[i].m_crown);\r\n                PoolManager.Instance.RecoverMeshSprite3D(this.m_aiList[i].m_flySprite);\r\n                PoolManager.Instance.RecoverMeshSprite3D(this.m_aiList[i].m_sprite);\r\n            }\r\n        }\r\n        this.m_aiList = [];\r\n    }\r\n    RessetAis() {\r\n        this.ClearAis();\r\n        this.CreatAi();\r\n    }\r\n}\r\n//# sourceMappingURL=AIManager.js.map",
  "references": [
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/Runner.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/PoolManager.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/ResourcesManager.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/ScenceManager.ts",
    "C:/Users/admin/Desktop/runner/src/GameUtils/GameUtils.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/Queue.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/LevelManager.ts"
  ],
  "map": "{\"version\":3,\"file\":\"AIManager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/Scripts/Game/AIManager.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,IAAO,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;AAC9B,IAAO,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,g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