12345678910 |
- {
- "code": "import Dictionary from \"../Util/Dictionary\";\r\nimport { PlayerAccount } from \"../Network/PlayerAccount\";\r\nimport { AccountConfig } from \"./DataMaker\";\r\nexport var MonsterType;\r\n(function (MonsterType) {\r\n MonsterType[MonsterType[\"BallBoss\"] = 0] = \"BallBoss\";\r\n MonsterType[MonsterType[\"Shooter\"] = 1] = \"Shooter\";\r\n MonsterType[MonsterType[\"Warrior\"] = 2] = \"Warrior\";\r\n})(MonsterType || (MonsterType = {}));\r\nexport var Weapontype;\r\n(function (Weapontype) {\r\n Weapontype[Weapontype[\"Guitar\"] = 1] = \"Guitar\";\r\n Weapontype[Weapontype[\"Fireaxe\"] = 2] = \"Fireaxe\";\r\n Weapontype[Weapontype[\"Chair\"] = 3] = \"Chair\";\r\n Weapontype[Weapontype[\"Pole\"] = 4] = \"Pole\";\r\n Weapontype[Weapontype[\"shuriken\"] = 5] = \"shuriken\";\r\n Weapontype[Weapontype[\"Pistol\"] = 6] = \"Pistol\";\r\n Weapontype[Weapontype[\"missile\"] = 7] = \"missile\";\r\n Weapontype[Weapontype[\"wtaagsg\"] = 8] = \"wtaagsg\";\r\n})(Weapontype || (Weapontype = {}));\r\nexport class MonsterConfig {\r\n constructor() {\r\n this.bulletamount = 1;\r\n this.recognition = 6;\r\n this.attack_range = 2;\r\n this.move_speed = 0.3;\r\n this.frequency = 1;\r\n this.bullet_speed = 1;\r\n }\r\n}\r\nexport class MonsterDataManager {\r\n constructor() {\r\n MonsterDataManager.OnInit();\r\n }\r\n static OnInit() {\r\n var enemy = PlayerAccount.CurAccountData.GetConfig(AccountConfig.enemy);\r\n for (var key in enemy) {\r\n var curdata = enemy[key];\r\n var id = Number(curdata.id);\r\n var monsterdata = new MonsterConfig();\r\n monsterdata.recognition = Number(curdata.recognition);\r\n monsterdata.attack_range = Number(curdata.attack_range);\r\n monsterdata.enemy_type = curdata.enemy_type;\r\n monsterdata.move_speed = Number(curdata.move_speed);\r\n monsterdata.frequency = Number(curdata.frequency);\r\n monsterdata.bullet_speed = Number(curdata.bullet_speed);\r\n this.MonsterDic.add(id, monsterdata);\r\n }\r\n var guitarmonster = this.MonsterDic.getValue(1);\r\n guitarmonster.monstertype = MonsterType.Warrior;\r\n guitarmonster.weapontype = Weapontype.Guitar;\r\n var fireaxemonster = this.MonsterDic.getValue(2);\r\n fireaxemonster.monstertype = MonsterType.Warrior;\r\n fireaxemonster.weapontype = Weapontype.Fireaxe;\r\n var chairmonster = this.MonsterDic.getValue(3);\r\n chairmonster.monstertype = MonsterType.Warrior;\r\n chairmonster.weapontype = Weapontype.Chair;\r\n var polemonster = this.MonsterDic.getValue(4);\r\n polemonster.monstertype = MonsterType.Warrior;\r\n polemonster.weapontype = Weapontype.Pole;\r\n var shurikenmonster1 = this.MonsterDic.getValue(5);\r\n shurikenmonster1.monstertype = MonsterType.Shooter;\r\n shurikenmonster1.bulletamount = 1;\r\n shurikenmonster1.weapontype = Weapontype.shuriken;\r\n var shurikenmonster2 = this.MonsterDic.getValue(6);\r\n shurikenmonster2.monstertype = MonsterType.Shooter;\r\n shurikenmonster2.weapontype = Weapontype.shuriken;\r\n shurikenmonster2.bulletamount = 2;\r\n var pistolmonster = this.MonsterDic.getValue(7);\r\n pistolmonster.monstertype = MonsterType.Shooter;\r\n pistolmonster.bulletamount = 1;\r\n pistolmonster.weapontype = Weapontype.Pistol;\r\n var pistolboos = this.MonsterDic.getValue(8);\r\n pistolboos.monstertype = MonsterType.Shooter;\r\n pistolboos.weapontype = Weapontype.Pistol;\r\n pistolboos.bulletamount = 3;\r\n pistolboos.masktype = 2;\r\n pistolboos.provocationclip = \"gunboosprovocation\";\r\n var shurikenboos = this.MonsterDic.getValue(9);\r\n shurikenboos.monstertype = MonsterType.Shooter;\r\n shurikenboos.weapontype = Weapontype.shuriken;\r\n shurikenboos.bulletamount = 3;\r\n shurikenboos.masktype = 3;\r\n shurikenboos.provocationclip = \"dartsboosprovocation\";\r\n var ballboos = this.MonsterDic.getValue(10);\r\n ballboos.monstertype = MonsterType.BallBoss;\r\n ballboos.weapontype = Weapontype.wtaagsg;\r\n ballboos.bulletamount = 1;\r\n ballboos.masktype = 5;\r\n ballboos.provocationclip = \"chuiboosprovocation\";\r\n var rooketboos = this.MonsterDic.getValue(11);\r\n rooketboos.monstertype = MonsterType.Shooter;\r\n rooketboos.weapontype = Weapontype.missile;\r\n rooketboos.bulletamount = 1;\r\n rooketboos.masktype = 4;\r\n rooketboos.provocationclip = \"paoboosprovocation\";\r\n }\r\n}\r\nMonsterDataManager.MonsterDic = new Dictionary();\r\n",
- "references": [
- "D:/Work/samurai2-laya/laya/samuraiflash-tt/src/Util/Dictionary.ts",
- "D:/Work/samurai2-laya/laya/samuraiflash-tt/src/Main/Warrior.ts",
- "D:/Work/samurai2-laya/laya/samuraiflash-tt/src/Network/PlayerAccount.ts",
- "D:/Work/samurai2-laya/laya/samuraiflash-tt/src/Main/DataMaker.ts"
- ]
- }
|