{
  "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",
  "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"
  ]
}
