captainbattle 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/dist/StringExpand.d.ts +4 -0
- package/dist/StringExpand.js +0 -0
- package/dist/adb-url-resolver.d.ts +34 -0
- package/dist/adb-url-resolver.js +57 -0
- package/dist/cc/dist/index.d.ts +273 -0
- package/dist/cc/dist/index.js +1185 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +9 -0
- package/dist/core/CallID.d.ts +131 -0
- package/dist/core/CallID.js +171 -0
- package/dist/core/ListenID.d.ts +476 -0
- package/dist/core/ListenID.js +517 -0
- package/dist/core/config/BadgeCfg.d.ts +287 -0
- package/dist/core/config/BadgeCfg.js +285 -0
- package/dist/core/config/BattleConfigCfg.d.ts +9 -0
- package/dist/core/config/BattleConfigCfg.js +8 -0
- package/dist/core/config/BattlePassCfg.d.ts +18 -0
- package/dist/core/config/BattlePassCfg.js +8 -0
- package/dist/core/config/BattlePassLvCfg.d.ts +15 -0
- package/dist/core/config/BattlePassLvCfg.js +8 -0
- package/dist/core/config/BlackMarketCfg.d.ts +16 -0
- package/dist/core/config/BlackMarketCfg.js +8 -0
- package/dist/core/config/BlackMarketGoodsCfg.d.ts +24 -0
- package/dist/core/config/BlackMarketGoodsCfg.js +8 -0
- package/dist/core/config/BlackTideIslandConfigCfg.d.ts +29 -0
- package/dist/core/config/BlackTideIslandConfigCfg.js +26 -0
- package/dist/core/config/BlackTideIslandDrawCfg.d.ts +10 -0
- package/dist/core/config/BlackTideIslandDrawCfg.js +8 -0
- package/dist/core/config/BlackTideIslandGameCfg.d.ts +8 -0
- package/dist/core/config/BlackTideIslandGameCfg.js +8 -0
- package/dist/core/config/BlackTideIslandGroupCfg.d.ts +10 -0
- package/dist/core/config/BlackTideIslandGroupCfg.js +8 -0
- package/dist/core/config/BlackTideIslandRoleCfg.d.ts +20 -0
- package/dist/core/config/BlackTideIslandRoleCfg.js +8 -0
- package/dist/core/config/BlackTideIslandSignInCfg.d.ts +9 -0
- package/dist/core/config/BlackTideIslandSignInCfg.js +8 -0
- package/dist/core/config/BountyConfigCfg.d.ts +20 -0
- package/dist/core/config/BountyConfigCfg.js +17 -0
- package/dist/core/config/BountyLvCfg.d.ts +8 -0
- package/dist/core/config/BountyLvCfg.js +8 -0
- package/dist/core/config/BountyTaskCfg.d.ts +11 -0
- package/dist/core/config/BountyTaskCfg.js +8 -0
- package/dist/core/config/BuffCfg.d.ts +151 -0
- package/dist/core/config/BuffCfg.js +139 -0
- package/dist/core/config/Cfg.d.ts +570 -0
- package/dist/core/config/Cfg.js +913 -0
- package/dist/core/config/ChatChannelCfg.d.ts +13 -0
- package/dist/core/config/ChatChannelCfg.js +8 -0
- package/dist/core/config/ChatEmojiCfg.d.ts +11 -0
- package/dist/core/config/ChatEmojiCfg.js +8 -0
- package/dist/core/config/CodeCfg.d.ts +8 -0
- package/dist/core/config/CodeCfg.js +8 -0
- package/dist/core/config/CodexGroupCfg.d.ts +24 -0
- package/dist/core/config/CodexGroupCfg.js +8 -0
- package/dist/core/config/CodexMonsterCfg.d.ts +8 -0
- package/dist/core/config/CodexMonsterCfg.js +8 -0
- package/dist/core/config/CodexTurretCfg.d.ts +9 -0
- package/dist/core/config/CodexTurretCfg.js +8 -0
- package/dist/core/config/CoinConfigCfg.d.ts +14 -0
- package/dist/core/config/CoinConfigCfg.js +8 -0
- package/dist/core/config/CoinDungeonConfigCfg.d.ts +25 -0
- package/dist/core/config/CoinDungeonConfigCfg.js +22 -0
- package/dist/core/config/CoinDungeonFishCfg.d.ts +11 -0
- package/dist/core/config/CoinDungeonFishCfg.js +8 -0
- package/dist/core/config/CoinDungeonGroupCfg.d.ts +16 -0
- package/dist/core/config/CoinDungeonGroupCfg.js +8 -0
- package/dist/core/config/CoinDungeonLevelCfg.d.ts +16 -0
- package/dist/core/config/CoinDungeonLevelCfg.js +8 -0
- package/dist/core/config/ConditionalGiftCfg.d.ts +14 -0
- package/dist/core/config/ConditionalGiftCfg.js +8 -0
- package/dist/core/config/Const.d.ts +27 -0
- package/dist/core/config/Const.js +32 -0
- package/dist/core/config/ConstConfigCfg.d.ts +57 -0
- package/dist/core/config/ConstConfigCfg.js +54 -0
- package/dist/core/config/DailyTrialBuffCfg.d.ts +10 -0
- package/dist/core/config/DailyTrialBuffCfg.js +8 -0
- package/dist/core/config/DailyTrialConfigCfg.d.ts +18 -0
- package/dist/core/config/DailyTrialConfigCfg.js +15 -0
- package/dist/core/config/DailyTrialLevelCfg.d.ts +13 -0
- package/dist/core/config/DailyTrialLevelCfg.js +8 -0
- package/dist/core/config/DailyTrialMapCfg.d.ts +15 -0
- package/dist/core/config/DailyTrialMapCfg.js +8 -0
- package/dist/core/config/DecorationAttrCfg.d.ts +14 -0
- package/dist/core/config/DecorationAttrCfg.js +8 -0
- package/dist/core/config/DragonCfg.d.ts +14 -0
- package/dist/core/config/DragonCfg.js +8 -0
- package/dist/core/config/DragonPathCfg.d.ts +8 -0
- package/dist/core/config/DragonPathCfg.js +8 -0
- package/dist/core/config/DrawTagCfg.d.ts +29 -0
- package/dist/core/config/DrawTagCfg.js +8 -0
- package/dist/core/config/DropPoolCfg.d.ts +16 -0
- package/dist/core/config/DropPoolCfg.js +8 -0
- package/dist/core/config/EffectPathCfg.d.ts +28 -0
- package/dist/core/config/EffectPathCfg.js +8 -0
- package/dist/core/config/EmailCfg.d.ts +25 -0
- package/dist/core/config/EmailCfg.js +21 -0
- package/dist/core/config/EndlessConfigCfg.d.ts +14 -0
- package/dist/core/config/EndlessConfigCfg.js +11 -0
- package/dist/core/config/EndlessEventCfg.d.ts +12 -0
- package/dist/core/config/EndlessEventCfg.js +8 -0
- package/dist/core/config/EnemyCfg.d.ts +66 -0
- package/dist/core/config/EnemyCfg.js +8 -0
- package/dist/core/config/EnemyGridCfg.d.ts +8 -0
- package/dist/core/config/EnemyGridCfg.js +8 -0
- package/dist/core/config/EquipCfg.d.ts +26 -0
- package/dist/core/config/EquipCfg.js +8 -0
- package/dist/core/config/EquipChestCfg.d.ts +12 -0
- package/dist/core/config/EquipChestCfg.js +8 -0
- package/dist/core/config/EquipCombineCfg.d.ts +10 -0
- package/dist/core/config/EquipCombineCfg.js +8 -0
- package/dist/core/config/EquipLvCfg.d.ts +11 -0
- package/dist/core/config/EquipLvCfg.js +8 -0
- package/dist/core/config/EquipmentDrawCfg.d.ts +8 -0
- package/dist/core/config/EquipmentDrawCfg.js +8 -0
- package/dist/core/config/EventTypeCfg.d.ts +10 -0
- package/dist/core/config/EventTypeCfg.js +8 -0
- package/dist/core/config/FightExpCfg.d.ts +12 -0
- package/dist/core/config/FightExpCfg.js +8 -0
- package/dist/core/config/FirstRechargeCfg.d.ts +11 -0
- package/dist/core/config/FirstRechargeCfg.js +8 -0
- package/dist/core/config/FormationCfg.d.ts +17 -0
- package/dist/core/config/FormationCfg.js +8 -0
- package/dist/core/config/FuncDescCfg.d.ts +139 -0
- package/dist/core/config/FuncDescCfg.js +134 -0
- package/dist/core/config/GemCfg.d.ts +37 -0
- package/dist/core/config/GemCfg.js +8 -0
- package/dist/core/config/GemCombineCfg.d.ts +9 -0
- package/dist/core/config/GemCombineCfg.js +8 -0
- package/dist/core/config/GemDrawCfg.d.ts +13 -0
- package/dist/core/config/GemDrawCfg.js +8 -0
- package/dist/core/config/GemEntryCfg.d.ts +35 -0
- package/dist/core/config/GemEntryCfg.js +8 -0
- package/dist/core/config/GemPurifyCfg.d.ts +11 -0
- package/dist/core/config/GemPurifyCfg.js +8 -0
- package/dist/core/config/GemRefinedCfg.d.ts +11 -0
- package/dist/core/config/GemRefinedCfg.js +8 -0
- package/dist/core/config/GemUnlockCfg.d.ts +9 -0
- package/dist/core/config/GemUnlockCfg.js +8 -0
- package/dist/core/config/GuideCfg.d.ts +29 -0
- package/dist/core/config/GuideCfg.js +8 -0
- package/dist/core/config/GuideConfigCfg.d.ts +14 -0
- package/dist/core/config/GuideConfigCfg.js +11 -0
- package/dist/core/config/GuideViewPathCfg.d.ts +11 -0
- package/dist/core/config/GuideViewPathCfg.js +8 -0
- package/dist/core/config/GuildBossCfg.d.ts +15 -0
- package/dist/core/config/GuildBossCfg.js +8 -0
- package/dist/core/config/GuildBossConfigCfg.d.ts +22 -0
- package/dist/core/config/GuildBossConfigCfg.js +19 -0
- package/dist/core/config/GuildBossLevelCfg.d.ts +11 -0
- package/dist/core/config/GuildBossLevelCfg.js +8 -0
- package/dist/core/config/GuildBossRankRewardCfg.d.ts +10 -0
- package/dist/core/config/GuildBossRankRewardCfg.js +8 -0
- package/dist/core/config/GuildBossWaveCfg.d.ts +13 -0
- package/dist/core/config/GuildBossWaveCfg.js +8 -0
- package/dist/core/config/GuildBounsCfg.d.ts +9 -0
- package/dist/core/config/GuildBounsCfg.js +8 -0
- package/dist/core/config/GuildBounsRankCfg.d.ts +10 -0
- package/dist/core/config/GuildBounsRankCfg.js +8 -0
- package/dist/core/config/GuildConfigCfg.d.ts +46 -0
- package/dist/core/config/GuildConfigCfg.js +43 -0
- package/dist/core/config/GuildDonateCfg.d.ts +10 -0
- package/dist/core/config/GuildDonateCfg.js +8 -0
- package/dist/core/config/GuildFlagCfg.d.ts +9 -0
- package/dist/core/config/GuildFlagCfg.js +8 -0
- package/dist/core/config/GuildLogCfg.d.ts +21 -0
- package/dist/core/config/GuildLogCfg.js +20 -0
- package/dist/core/config/GuildLvCfg.d.ts +14 -0
- package/dist/core/config/GuildLvCfg.js +8 -0
- package/dist/core/config/GuildSupplyCfg.d.ts +10 -0
- package/dist/core/config/GuildSupplyCfg.js +8 -0
- package/dist/core/config/InitialItemsCfg.d.ts +9 -0
- package/dist/core/config/InitialItemsCfg.js +8 -0
- package/dist/core/config/IntegralTaskCfg.d.ts +12 -0
- package/dist/core/config/IntegralTaskCfg.js +8 -0
- package/dist/core/config/ItemsCfg.d.ts +40 -0
- package/dist/core/config/ItemsCfg.js +26 -0
- package/dist/core/config/MapTraitCfg.d.ts +12 -0
- package/dist/core/config/MapTraitCfg.js +8 -0
- package/dist/core/config/MarqueeChannelCfg.d.ts +10 -0
- package/dist/core/config/MarqueeChannelCfg.js +8 -0
- package/dist/core/config/MarqueeConfigCfg.d.ts +14 -0
- package/dist/core/config/MarqueeConfigCfg.js +11 -0
- package/dist/core/config/MarqueeContentCfg.d.ts +15 -0
- package/dist/core/config/MarqueeContentCfg.js +8 -0
- package/dist/core/config/MonsterTraitCfg.d.ts +10 -0
- package/dist/core/config/MonsterTraitCfg.js +8 -0
- package/dist/core/config/PetCfg.d.ts +14 -0
- package/dist/core/config/PetCfg.js +8 -0
- package/dist/core/config/PetSkillCfg.d.ts +13 -0
- package/dist/core/config/PetSkillCfg.js +8 -0
- package/dist/core/config/PetSlotLvCfg.d.ts +9 -0
- package/dist/core/config/PetSlotLvCfg.js +8 -0
- package/dist/core/config/PetStarCfg.d.ts +12 -0
- package/dist/core/config/PetStarCfg.js +8 -0
- package/dist/core/config/PlayerLvCfg.d.ts +8 -0
- package/dist/core/config/PlayerLvCfg.js +8 -0
- package/dist/core/config/PrivilegeCardCfg.d.ts +10 -0
- package/dist/core/config/PrivilegeCardCfg.js +8 -0
- package/dist/core/config/PrivilegeCfg.d.ts +29 -0
- package/dist/core/config/PrivilegeCfg.js +27 -0
- package/dist/core/config/PrivilegeItemCfg.d.ts +9 -0
- package/dist/core/config/PrivilegeItemCfg.js +8 -0
- package/dist/core/config/ProDefineCfg.d.ts +23 -0
- package/dist/core/config/ProDefineCfg.js +8 -0
- package/dist/core/config/QualityCfg.d.ts +37 -0
- package/dist/core/config/QualityCfg.js +8 -0
- package/dist/core/config/QuestionnaireCfg.d.ts +17 -0
- package/dist/core/config/QuestionnaireCfg.js +12 -0
- package/dist/core/config/RandomNameCfg.d.ts +10 -0
- package/dist/core/config/RandomNameCfg.js +8 -0
- package/dist/core/config/RelicCfg.d.ts +18 -0
- package/dist/core/config/RelicCfg.js +8 -0
- package/dist/core/config/RelicDungeonBuffCfg.d.ts +10 -0
- package/dist/core/config/RelicDungeonBuffCfg.js +8 -0
- package/dist/core/config/RelicDungeonConfigCfg.d.ts +17 -0
- package/dist/core/config/RelicDungeonConfigCfg.js +14 -0
- package/dist/core/config/RelicDungeonLevelCfg.d.ts +17 -0
- package/dist/core/config/RelicDungeonLevelCfg.js +8 -0
- package/dist/core/config/RelicEntryCfg.d.ts +15 -0
- package/dist/core/config/RelicEntryCfg.js +8 -0
- package/dist/core/config/RelicPurifyCfg.d.ts +11 -0
- package/dist/core/config/RelicPurifyCfg.js +8 -0
- package/dist/core/config/RelicRandomAttrCfg.d.ts +10 -0
- package/dist/core/config/RelicRandomAttrCfg.js +8 -0
- package/dist/core/config/RelicRandomAttrScoreCfg.d.ts +9 -0
- package/dist/core/config/RelicRandomAttrScoreCfg.js +8 -0
- package/dist/core/config/RelicTiesCfg.d.ts +9 -0
- package/dist/core/config/RelicTiesCfg.js +8 -0
- package/dist/core/config/RoleCfg.d.ts +34 -0
- package/dist/core/config/RoleCfg.js +8 -0
- package/dist/core/config/RuleDescCfg.d.ts +45 -0
- package/dist/core/config/RuleDescCfg.js +41 -0
- package/dist/core/config/ServerNameCfg.d.ts +9 -0
- package/dist/core/config/ServerNameCfg.js +8 -0
- package/dist/core/config/ShopCfg.d.ts +32 -0
- package/dist/core/config/ShopCfg.js +8 -0
- package/dist/core/config/ShowCfg.d.ts +13 -0
- package/dist/core/config/ShowCfg.js +8 -0
- package/dist/core/config/SignCfg.d.ts +16 -0
- package/dist/core/config/SignCfg.js +8 -0
- package/dist/core/config/SignDayCfg.d.ts +14 -0
- package/dist/core/config/SignDayCfg.js +8 -0
- package/dist/core/config/SkillCfg.d.ts +64 -0
- package/dist/core/config/SkillCfg.js +8 -0
- package/dist/core/config/SkillEmitterCfg.d.ts +9 -0
- package/dist/core/config/SkillEmitterCfg.js +8 -0
- package/dist/core/config/SkinCfg.d.ts +26 -0
- package/dist/core/config/SkinCfg.js +8 -0
- package/dist/core/config/SkinGroupCfg.d.ts +13 -0
- package/dist/core/config/SkinGroupCfg.js +8 -0
- package/dist/core/config/SkinLvCfg.d.ts +11 -0
- package/dist/core/config/SkinLvCfg.js +8 -0
- package/dist/core/config/SkinSkillCfg.d.ts +11 -0
- package/dist/core/config/SkinSkillCfg.js +8 -0
- package/dist/core/config/SkinSlotCfg.d.ts +9 -0
- package/dist/core/config/SkinSlotCfg.js +8 -0
- package/dist/core/config/SkinStarCfg.d.ts +10 -0
- package/dist/core/config/SkinStarCfg.js +8 -0
- package/dist/core/config/SoundCfg.d.ts +100 -0
- package/dist/core/config/SoundCfg.js +89 -0
- package/dist/core/config/SprintActivityConfigCfg.d.ts +28 -0
- package/dist/core/config/SprintActivityConfigCfg.js +25 -0
- package/dist/core/config/SprintActivityRankRewardCfg.d.ts +11 -0
- package/dist/core/config/SprintActivityRankRewardCfg.js +8 -0
- package/dist/core/config/StageCfg.d.ts +40 -0
- package/dist/core/config/StageCfg.js +8 -0
- package/dist/core/config/StageTemplateCfg.d.ts +13 -0
- package/dist/core/config/StageTemplateCfg.js +8 -0
- package/dist/core/config/StarRewardCfg.d.ts +9 -0
- package/dist/core/config/StarRewardCfg.js +8 -0
- package/dist/core/config/TConfig.d.ts +37 -0
- package/dist/core/config/TConfig.js +182 -0
- package/dist/core/config/TagCfg.d.ts +13 -0
- package/dist/core/config/TagCfg.js +8 -0
- package/dist/core/config/TalentLvCfg.d.ts +16 -0
- package/dist/core/config/TalentLvCfg.js +8 -0
- package/dist/core/config/TalentRewardCfg.d.ts +16 -0
- package/dist/core/config/TalentRewardCfg.js +8 -0
- package/dist/core/config/TalentTreeCfg.d.ts +15 -0
- package/dist/core/config/TalentTreeCfg.js +8 -0
- package/dist/core/config/TalentTreeLvCfg.d.ts +14 -0
- package/dist/core/config/TalentTreeLvCfg.js +8 -0
- package/dist/core/config/TaskCfg.d.ts +24 -0
- package/dist/core/config/TaskCfg.js +8 -0
- package/dist/core/config/TaskRewardCfg.d.ts +11 -0
- package/dist/core/config/TaskRewardCfg.js +8 -0
- package/dist/core/config/TaskTypeCfg.d.ts +13 -0
- package/dist/core/config/TaskTypeCfg.js +8 -0
- package/dist/core/config/TreasureChestCfg.d.ts +31 -0
- package/dist/core/config/TreasureChestCfg.js +14 -0
- package/dist/core/config/TreasureLevelCfg.d.ts +12 -0
- package/dist/core/config/TreasureLevelCfg.js +8 -0
- package/dist/core/config/TurretDrawCfg.d.ts +8 -0
- package/dist/core/config/TurretDrawCfg.js +8 -0
- package/dist/core/config/TurretLotteryCfg.d.ts +14 -0
- package/dist/core/config/TurretLotteryCfg.js +8 -0
- package/dist/core/config/TurretLotteryGroupCfg.d.ts +10 -0
- package/dist/core/config/TurretLotteryGroupCfg.js +8 -0
- package/dist/core/config/TurretLotteryIconCfg.d.ts +10 -0
- package/dist/core/config/TurretLotteryIconCfg.js +8 -0
- package/dist/core/config/TurretLotteryWeightCfg.d.ts +8 -0
- package/dist/core/config/TurretLotteryWeightCfg.js +8 -0
- package/dist/core/config/TurretLvCfg.d.ts +15 -0
- package/dist/core/config/TurretLvCfg.js +8 -0
- package/dist/core/config/TypeRandCfg.d.ts +13 -0
- package/dist/core/config/TypeRandCfg.js +8 -0
- package/dist/core/config/VehicleWashConfigCfg.d.ts +17 -0
- package/dist/core/config/VehicleWashConfigCfg.js +14 -0
- package/dist/core/config/VehicleWashLevelCfg.d.ts +11 -0
- package/dist/core/config/VehicleWashLevelCfg.js +8 -0
- package/dist/core/config/WavesInfoCfg.d.ts +37 -0
- package/dist/core/config/WavesInfoCfg.js +8 -0
- package/dist/core/config/WeatherTraitCfg.d.ts +11 -0
- package/dist/core/config/WeatherTraitCfg.js +8 -0
- package/dist/core/framework/Log.d.ts +10 -0
- package/dist/core/framework/Log.js +29 -0
- package/dist/core/framework/Pool.d.ts +99 -0
- package/dist/core/framework/Pool.js +363 -0
- package/dist/core/framework/Time.d.ts +75 -0
- package/dist/core/framework/Time.js +253 -0
- package/dist/core/framework/Watcher.d.ts +21 -0
- package/dist/core/framework/Watcher.js +79 -0
- package/dist/core/framework/collections/MinSortList.d.ts +24 -0
- package/dist/core/framework/collections/MinSortList.js +152 -0
- package/dist/core/framework/collections/ObjectPool.d.ts +11 -0
- package/dist/core/framework/collections/ObjectPool.js +45 -0
- package/dist/core/framework/notify/Notifier.d.ts +69 -0
- package/dist/core/framework/notify/Notifier.js +169 -0
- package/dist/core/framework/notify/NotifyCaller.d.ts +7 -0
- package/dist/core/framework/notify/NotifyCaller.js +40 -0
- package/dist/core/framework/notify/NotifyID.d.ts +14 -0
- package/dist/core/framework/notify/NotifyID.js +18 -0
- package/dist/core/framework/notify/NotifyListener.d.ts +29 -0
- package/dist/core/framework/notify/NotifyListener.js +190 -0
- package/dist/core/module/battle/Game.d.ts +358 -0
- package/dist/core/module/battle/Game.js +1340 -0
- package/dist/core/module/battle/IGameModule.d.ts +98 -0
- package/dist/core/module/battle/IGameModule.js +877 -0
- package/dist/core/module/battle/battle.interface.d.ts +248 -0
- package/dist/core/module/battle/battle.interface.js +76 -0
- package/dist/core/module/battle/buff/BuffMgr.d.ts +77 -0
- package/dist/core/module/battle/buff/BuffMgr.js +63 -0
- package/dist/core/module/battle/buff/BuffPool.d.ts +22 -0
- package/dist/core/module/battle/buff/BuffPool.js +64 -0
- package/dist/core/module/battle/buff/BuffTrigger.d.ts +5 -0
- package/dist/core/module/battle/buff/BuffTrigger.js +410 -0
- package/dist/core/module/battle/buff/buffitem/AddActionTimeBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/AddActionTimeBuff.js +31 -0
- package/dist/core/module/battle/buff/buffitem/AddAtrBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/AddAtrBuff.js +51 -0
- package/dist/core/module/battle/buff/buffitem/AddCritLayerBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/AddCritLayerBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/AddPhysicDamBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/AddPhysicDamBuff.js +45 -0
- package/dist/core/module/battle/buff/buffitem/AddProjectBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/AddProjectBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/AddSkillNumBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/AddSkillNumBuff.js +36 -0
- package/dist/core/module/battle/buff/buffitem/ArmorBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ArmorBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/AshBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/AshBuff.js +44 -0
- package/dist/core/module/battle/buff/buffitem/AttackInvisibleBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/AttackInvisibleBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/AttackSpeedBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/AttackSpeedBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/BackHitAddAttrBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/BackHitAddAttrBuff.js +94 -0
- package/dist/core/module/battle/buff/buffitem/BaseBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/BaseBuff.js +21 -0
- package/dist/core/module/battle/buff/buffitem/BleedBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/BleedBuff.js +46 -0
- package/dist/core/module/battle/buff/buffitem/BlizzardBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/BlizzardBuff.js +60 -0
- package/dist/core/module/battle/buff/buffitem/BounceCutDamageBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/BounceCutDamageBuff.js +39 -0
- package/dist/core/module/battle/buff/buffitem/BulletDeviationBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/BulletDeviationBuff.js +45 -0
- package/dist/core/module/battle/buff/buffitem/BurnBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/BurnBuff.js +64 -0
- package/dist/core/module/battle/buff/buffitem/ChangeActionBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ChangeActionBuff.js +47 -0
- package/dist/core/module/battle/buff/buffitem/ChangeActionTypeBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ChangeActionTypeBuff.js +42 -0
- package/dist/core/module/battle/buff/buffitem/ChangeEntityStepBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ChangeEntityStepBuff.js +40 -0
- package/dist/core/module/battle/buff/buffitem/ChangeSetpAddDamageBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/ChangeSetpAddDamageBuff.js +86 -0
- package/dist/core/module/battle/buff/buffitem/ChangeSetpTimeBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ChangeSetpTimeBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ChangeStateBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ChangeStateBuff.js +46 -0
- package/dist/core/module/battle/buff/buffitem/ChillBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/ChillBuff.js +28 -0
- package/dist/core/module/battle/buff/buffitem/ClearBuffBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/ClearBuffBuff.js +25 -0
- package/dist/core/module/battle/buff/buffitem/CurHpDamBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/CurHpDamBuff.js +48 -0
- package/dist/core/module/battle/buff/buffitem/CurseBuff.d.ts +14 -0
- package/dist/core/module/battle/buff/buffitem/CurseBuff.js +74 -0
- package/dist/core/module/battle/buff/buffitem/CutSkillCdBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/CutSkillCdBuff.js +73 -0
- package/dist/core/module/battle/buff/buffitem/DamMarkBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/DamMarkBuff.js +50 -0
- package/dist/core/module/battle/buff/buffitem/DebuffAddAttrBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/DebuffAddAttrBuff.js +59 -0
- package/dist/core/module/battle/buff/buffitem/DeltaUseSkillBuff.d.ts +11 -0
- package/dist/core/module/battle/buff/buffitem/DeltaUseSkillBuff.js +112 -0
- package/dist/core/module/battle/buff/buffitem/DiceAddAttrBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/DiceAddAttrBuff.js +55 -0
- package/dist/core/module/battle/buff/buffitem/DisarmBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/DisarmBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/DizzinessBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/DizzinessBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/DominationBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/DominationBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ElectricMarkBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/ElectricMarkBuff.js +25 -0
- package/dist/core/module/battle/buff/buffitem/ElectrifyBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/ElectrifyBuff.js +45 -0
- package/dist/core/module/battle/buff/buffitem/EnemyBuff1Buff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/EnemyBuff1Buff.js +59 -0
- package/dist/core/module/battle/buff/buffitem/EnemyRatioBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/EnemyRatioBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/FixedProjectileNumBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/FixedProjectileNumBuff.js +42 -0
- package/dist/core/module/battle/buff/buffitem/FollowMainEntityBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/FollowMainEntityBuff.js +44 -0
- package/dist/core/module/battle/buff/buffitem/ForceTargetBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/ForceTargetBuff.js +59 -0
- package/dist/core/module/battle/buff/buffitem/FrozenBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/FrozenBuff.js +59 -0
- package/dist/core/module/battle/buff/buffitem/HaulBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/HaulBuff.js +50 -0
- package/dist/core/module/battle/buff/buffitem/HightHpAddCritBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/HightHpAddCritBuff.js +55 -0
- package/dist/core/module/battle/buff/buffitem/HitBoundAddDamageBuff.d.ts +11 -0
- package/dist/core/module/battle/buff/buffitem/HitBoundAddDamageBuff.js +78 -0
- package/dist/core/module/battle/buff/buffitem/HitEnemyAddDamBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/HitEnemyAddDamBuff.js +65 -0
- package/dist/core/module/battle/buff/buffitem/HornBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/HornBuff.js +78 -0
- package/dist/core/module/battle/buff/buffitem/HpAddDamageBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/HpAddDamageBuff.js +66 -0
- package/dist/core/module/battle/buff/buffitem/HpShieldBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/HpShieldBuff.js +24 -0
- package/dist/core/module/battle/buff/buffitem/IceShieldBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/IceShieldBuff.js +38 -0
- package/dist/core/module/battle/buff/buffitem/IcicleBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/IcicleBuff.js +45 -0
- package/dist/core/module/battle/buff/buffitem/ImmueChillBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueChillBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueDisarmBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueDisarmBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueDizzinessBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueDizzinessBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueElectrifyBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueElectrifyBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueFrozenBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueFrozenBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueParalysisBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueParalysisBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueRepelBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueRepelBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueSlayBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueSlayBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueSlowBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueSlowBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmueVulnerableBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmueVulnerableBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneDizzinessBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneDizzinessBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneFrozenBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneFrozenBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneParalysisBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneParalysisBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/InDebuffAddAttrBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/InDebuffAddAttrBuff.js +55 -0
- package/dist/core/module/battle/buff/buffitem/InvicibleBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/InvicibleBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/LastSkillNumAddDamageBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/LastSkillNumAddDamageBuff.js +51 -0
- package/dist/core/module/battle/buff/buffitem/LinkCurseBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/LinkCurseBuff.js +131 -0
- package/dist/core/module/battle/buff/buffitem/LinkLogBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/LinkLogBuff.js +24 -0
- package/dist/core/module/battle/buff/buffitem/LockOffsetBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/LockOffsetBuff.js +22 -0
- package/dist/core/module/battle/buff/buffitem/LockTargetBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/LockTargetBuff.js +40 -0
- package/dist/core/module/battle/buff/buffitem/LvAddDamBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/LvAddDamBuff.js +39 -0
- package/dist/core/module/battle/buff/buffitem/MagazineSwapProjectBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/MagazineSwapProjectBuff.js +45 -0
- package/dist/core/module/battle/buff/buffitem/MagazineSwapTimeBuff.d.ts +11 -0
- package/dist/core/module/battle/buff/buffitem/MagazineSwapTimeBuff.js +114 -0
- package/dist/core/module/battle/buff/buffitem/MaxHpDamBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/MaxHpDamBuff.js +48 -0
- package/dist/core/module/battle/buff/buffitem/MirrorUseSkillBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/MirrorUseSkillBuff.js +59 -0
- package/dist/core/module/battle/buff/buffitem/ModifyInHitBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/ModifyInHitBuff.js +72 -0
- package/dist/core/module/battle/buff/buffitem/ModifyProjectileAttrBuff.d.ts +11 -0
- package/dist/core/module/battle/buff/buffitem/ModifyProjectileAttrBuff.js +69 -0
- package/dist/core/module/battle/buff/buffitem/MonitorBuff.d.ts +19 -0
- package/dist/core/module/battle/buff/buffitem/MonitorBuff.js +203 -0
- package/dist/core/module/battle/buff/buffitem/NotAllowSplitBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/NotAllowSplitBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/ParalysisBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ParalysisBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/PosionBuff.d.ts +15 -0
- package/dist/core/module/battle/buff/buffitem/PosionBuff.js +85 -0
- package/dist/core/module/battle/buff/buffitem/PosionExtraAddBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/PosionExtraAddBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/PowerUpAddDamBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/PowerUpAddDamBuff.js +70 -0
- package/dist/core/module/battle/buff/buffitem/PriorityTargetBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/PriorityTargetBuff.js +58 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileAlignShootBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileAlignShootBuff.js +97 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileCreateDamageBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileCreateDamageBuff.js +62 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileCreateScaleBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileCreateScaleBuff.js +65 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileCrossDamageBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileCrossDamageBuff.js +73 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileHitByTimesBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileHitByTimesBuff.js +86 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileOrbLinkBuff.d.ts +30 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileOrbLinkBuff.js +393 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileRandomDamageBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileRandomDamageBuff.js +42 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileScaleUpBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/ProjectileScaleUpBuff.js +87 -0
- package/dist/core/module/battle/buff/buffitem/ProtectBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ProtectBuff.js +40 -0
- package/dist/core/module/battle/buff/buffitem/RandomDamageBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/RandomDamageBuff.js +81 -0
- package/dist/core/module/battle/buff/buffitem/RangeAtrBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/RangeAtrBuff.js +62 -0
- package/dist/core/module/battle/buff/buffitem/ReduceAtrBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/ReduceAtrBuff.js +49 -0
- package/dist/core/module/battle/buff/buffitem/RepelBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/RepelBuff.js +82 -0
- package/dist/core/module/battle/buff/buffitem/ReplaceSkillBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ReplaceSkillBuff.js +109 -0
- package/dist/core/module/battle/buff/buffitem/RestoreSkillNumBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/RestoreSkillNumBuff.js +40 -0
- package/dist/core/module/battle/buff/buffitem/SameHitAddDamageBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/SameHitAddDamageBuff.js +53 -0
- package/dist/core/module/battle/buff/buffitem/ScaleBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/ScaleBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/SearBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/SearBuff.js +44 -0
- package/dist/core/module/battle/buff/buffitem/SetSelectBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/SetSelectBuff.js +41 -0
- package/dist/core/module/battle/buff/buffitem/ShieldAddDamBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/ShieldAddDamBuff.js +46 -0
- package/dist/core/module/battle/buff/buffitem/ShieldAndSpeedBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/ShieldAndSpeedBuff.js +40 -0
- package/dist/core/module/battle/buff/buffitem/ShootAddDamageBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/ShootAddDamageBuff.js +44 -0
- package/dist/core/module/battle/buff/buffitem/SlayBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/SlayBuff.js +62 -0
- package/dist/core/module/battle/buff/buffitem/SlowBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/SlowBuff.js +25 -0
- package/dist/core/module/battle/buff/buffitem/SneakBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/SneakBuff.js +31 -0
- package/dist/core/module/battle/buff/buffitem/SprintBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/SprintBuff.js +71 -0
- package/dist/core/module/battle/buff/buffitem/StableBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/StableBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/StateChangeBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/StateChangeBuff.js +71 -0
- package/dist/core/module/battle/buff/buffitem/StorageBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/StorageBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/SurgeBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/SurgeBuff.js +28 -0
- package/dist/core/module/battle/buff/buffitem/SwordWindShieldBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/SwordWindShieldBuff.js +60 -0
- package/dist/core/module/battle/buff/buffitem/SwordWindWallBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/SwordWindWallBuff.js +38 -0
- package/dist/core/module/battle/buff/buffitem/TeleportBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/TeleportBuff.js +85 -0
- package/dist/core/module/battle/buff/buffitem/TimeAddDamageBuff.d.ts +11 -0
- package/dist/core/module/battle/buff/buffitem/TimeAddDamageBuff.js +84 -0
- package/dist/core/module/battle/buff/buffitem/TowerCritBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/TowerCritBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/VulnerableBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/VulnerableBuff.js +27 -0
- package/dist/core/module/battle/buff/buffitem/index.d.ts +122 -0
- package/dist/core/module/battle/buff/buffitem/index.js +134 -0
- package/dist/core/module/battle/collider/Collider.d.ts +60 -0
- package/dist/core/module/battle/collider/Collider.js +54 -0
- package/dist/core/module/battle/collider/ColliderPool.d.ts +15 -0
- package/dist/core/module/battle/collider/ColliderPool.js +60 -0
- package/dist/core/module/battle/collider/QuadTree.d.ts +48 -0
- package/dist/core/module/battle/collider/QuadTree.js +192 -0
- package/dist/core/module/battle/entity/BaseEntityData.d.ts +141 -0
- package/dist/core/module/battle/entity/BaseEntityData.js +355 -0
- package/dist/core/module/battle/entity/DragonBodyData.d.ts +16 -0
- package/dist/core/module/battle/entity/DragonBodyData.js +32 -0
- package/dist/core/module/battle/entity/DragonData.d.ts +15 -0
- package/dist/core/module/battle/entity/DragonData.js +31 -0
- package/dist/core/module/battle/entity/EntityPool.d.ts +13 -0
- package/dist/core/module/battle/entity/EntityPool.js +60 -0
- package/dist/core/module/battle/entity/EntityPoolSpawner.d.ts +5 -0
- package/dist/core/module/battle/entity/EntityPoolSpawner.js +67 -0
- package/dist/core/module/battle/entity/FighterData.d.ts +131 -0
- package/dist/core/module/battle/entity/FighterData.js +466 -0
- package/dist/core/module/battle/entity/ProjectileData.d.ts +107 -0
- package/dist/core/module/battle/entity/ProjectileData.js +262 -0
- package/dist/core/module/battle/entity/RoleData.d.ts +11 -0
- package/dist/core/module/battle/entity/RoleData.js +43 -0
- package/dist/core/module/battle/entity/index.d.ts +8 -0
- package/dist/core/module/battle/entity/index.js +20 -0
- package/dist/core/module/battle/event/EntityEvent.d.ts +80 -0
- package/dist/core/module/battle/event/EntityEvent.js +84 -0
- package/dist/core/module/battle/event/EntityEventBus.d.ts +27 -0
- package/dist/core/module/battle/event/EntityEventBus.js +73 -0
- package/dist/core/module/battle/event/EventBind.d.ts +35 -0
- package/dist/core/module/battle/event/EventBind.js +93 -0
- package/dist/core/module/battle/event/EventListener.d.ts +60 -0
- package/dist/core/module/battle/event/EventListener.js +360 -0
- package/dist/core/module/battle/event/GameEvent.d.ts +44 -0
- package/dist/core/module/battle/event/GameEvent.js +52 -0
- package/dist/core/module/battle/factory/FighterFactory.d.ts +14 -0
- package/dist/core/module/battle/factory/FighterFactory.js +237 -0
- package/dist/core/module/battle/fsm-state/AnyFighterStateTransitions.d.ts +59 -0
- package/dist/core/module/battle/fsm-state/AnyFighterStateTransitions.js +183 -0
- package/dist/core/module/battle/fsm-state/AnyFighterStates.d.ts +108 -0
- package/dist/core/module/battle/fsm-state/AnyFighterStates.js +560 -0
- package/dist/core/module/battle/fsm-state/Boss18110CallState.d.ts +19 -0
- package/dist/core/module/battle/fsm-state/Boss18110CallState.js +49 -0
- package/dist/core/module/battle/fsm-state/Boss18110State.d.ts +15 -0
- package/dist/core/module/battle/fsm-state/Boss18110State.js +38 -0
- package/dist/core/module/battle/fsm-state/Boss18110Transitions.d.ts +11 -0
- package/dist/core/module/battle/fsm-state/Boss18110Transitions.js +52 -0
- package/dist/core/module/battle/fsm-state/DragonBodyFighterStates.d.ts +11 -0
- package/dist/core/module/battle/fsm-state/DragonBodyFighterStates.js +27 -0
- package/dist/core/module/battle/fsm-state/DragonFighterStates.d.ts +22 -0
- package/dist/core/module/battle/fsm-state/DragonFighterStates.js +162 -0
- package/dist/core/module/battle/fsm-state/FighterStateMachine.d.ts +7 -0
- package/dist/core/module/battle/fsm-state/FighterStateMachine.js +50 -0
- package/dist/core/module/battle/fsm-state/FighterStateProfiles.d.ts +18 -0
- package/dist/core/module/battle/fsm-state/FighterStateProfiles.js +109 -0
- package/dist/core/module/battle/fsm-state/FighterStateRegistry.d.ts +25 -0
- package/dist/core/module/battle/fsm-state/FighterStateRegistry.js +73 -0
- package/dist/core/module/battle/fsm-state/FighterStateShared.d.ts +23 -0
- package/dist/core/module/battle/fsm-state/FighterStateShared.js +274 -0
- package/dist/core/module/battle/fsm-state/FighterStateTransition.d.ts +11 -0
- package/dist/core/module/battle/fsm-state/FighterStateTransition.js +15 -0
- package/dist/core/module/battle/fsm-state/FighterStateType.d.ts +17 -0
- package/dist/core/module/battle/fsm-state/FighterStateType.js +21 -0
- package/dist/core/module/battle/fsm-state/index.d.ts +7 -0
- package/dist/core/module/battle/fsm-state/index.js +19 -0
- package/dist/core/module/battle/manager/EntityManager.d.ts +10 -0
- package/dist/core/module/battle/manager/EntityManager.js +219 -0
- package/dist/core/module/battle/render/RenderModule.d.ts +10 -0
- package/dist/core/module/battle/render/RenderModule.js +19 -0
- package/dist/core/module/battle/skill/SkillData.d.ts +23 -0
- package/dist/core/module/battle/skill/SkillData.js +23 -0
- package/dist/core/module/battle/skill/emitter/SkillDirectEmitter.d.ts +12 -0
- package/dist/core/module/battle/skill/emitter/SkillDirectEmitter.js +98 -0
- package/dist/core/module/battle/skill/emitter/SkillEmitter.d.ts +12 -0
- package/dist/core/module/battle/skill/emitter/SkillEmitter.js +60 -0
- package/dist/core/module/battle/skill/emitter/SkillRandomDirEmitter.d.ts +12 -0
- package/dist/core/module/battle/skill/emitter/SkillRandomDirEmitter.js +68 -0
- package/dist/core/module/battle/skill/emitter/SkillRandomIndexEmitter.d.ts +12 -0
- package/dist/core/module/battle/skill/emitter/SkillRandomIndexEmitter.js +71 -0
- package/dist/core/module/battle/skill/emitter/index.d.ts +4 -0
- package/dist/core/module/battle/skill/emitter/index.js +16 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter.d.ts +30 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter.js +120 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter0.d.ts +8 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter0.js +39 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter1.d.ts +24 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter1.js +162 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter10.d.ts +40 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter10.js +229 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter11.d.ts +12 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter11.js +39 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter12.d.ts +9 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter12.js +53 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter13.d.ts +77 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter13.js +431 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter14.d.ts +24 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter14.js +112 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter15.d.ts +17 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter15.js +107 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter16.d.ts +23 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter16.js +116 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter17.d.ts +26 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter17.js +81 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter18.d.ts +17 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter18.js +86 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter19.d.ts +57 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter19.js +327 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter2.d.ts +13 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter2.js +81 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter20.d.ts +12 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter20.js +49 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter21.d.ts +21 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter21.js +103 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter22.d.ts +18 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter22.js +68 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter23.d.ts +33 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter23.js +130 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter24.d.ts +31 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter24.js +139 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter25.d.ts +16 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter25.js +60 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter26.d.ts +30 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter26.js +72 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter27.d.ts +19 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter27.js +74 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter28.d.ts +25 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter28.js +212 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter29.d.ts +49 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter29.js +359 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter3.d.ts +74 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter3.js +420 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter4.d.ts +76 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter4.js +413 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter5.d.ts +9 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter5.js +42 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter6.d.ts +18 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter6.js +111 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter7.d.ts +36 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter7.js +114 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter8.d.ts +24 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter8.js +253 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter9.d.ts +9 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter9.js +56 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitterShared.d.ts +45 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitterShared.js +68 -0
- package/dist/core/module/battle/skill/emitter/projectiles/index.d.ts +32 -0
- package/dist/core/module/battle/skill/emitter/projectiles/index.js +44 -0
- package/dist/core/module/battle/skill/impacts/Impact0.d.ts +7 -0
- package/dist/core/module/battle/skill/impacts/Impact0.js +20 -0
- package/dist/core/module/battle/skill/impacts/Impact1.d.ts +14 -0
- package/dist/core/module/battle/skill/impacts/Impact1.js +77 -0
- package/dist/core/module/battle/skill/impacts/Impact10.d.ts +13 -0
- package/dist/core/module/battle/skill/impacts/Impact10.js +55 -0
- package/dist/core/module/battle/skill/impacts/Impact11.d.ts +11 -0
- package/dist/core/module/battle/skill/impacts/Impact11.js +33 -0
- package/dist/core/module/battle/skill/impacts/Impact12.d.ts +10 -0
- package/dist/core/module/battle/skill/impacts/Impact12.js +35 -0
- package/dist/core/module/battle/skill/impacts/Impact13.d.ts +14 -0
- package/dist/core/module/battle/skill/impacts/Impact13.js +49 -0
- package/dist/core/module/battle/skill/impacts/Impact14.d.ts +10 -0
- package/dist/core/module/battle/skill/impacts/Impact14.js +36 -0
- package/dist/core/module/battle/skill/impacts/Impact15.d.ts +10 -0
- package/dist/core/module/battle/skill/impacts/Impact15.js +35 -0
- package/dist/core/module/battle/skill/impacts/Impact16.d.ts +12 -0
- package/dist/core/module/battle/skill/impacts/Impact16.js +33 -0
- package/dist/core/module/battle/skill/impacts/Impact17.d.ts +12 -0
- package/dist/core/module/battle/skill/impacts/Impact17.js +39 -0
- package/dist/core/module/battle/skill/impacts/Impact18.d.ts +12 -0
- package/dist/core/module/battle/skill/impacts/Impact18.js +33 -0
- package/dist/core/module/battle/skill/impacts/Impact2.d.ts +16 -0
- package/dist/core/module/battle/skill/impacts/Impact2.js +89 -0
- package/dist/core/module/battle/skill/impacts/Impact3.d.ts +30 -0
- package/dist/core/module/battle/skill/impacts/Impact3.js +254 -0
- package/dist/core/module/battle/skill/impacts/Impact4.d.ts +11 -0
- package/dist/core/module/battle/skill/impacts/Impact4.js +27 -0
- package/dist/core/module/battle/skill/impacts/Impact5.d.ts +18 -0
- package/dist/core/module/battle/skill/impacts/Impact5.js +211 -0
- package/dist/core/module/battle/skill/impacts/Impact6.d.ts +19 -0
- package/dist/core/module/battle/skill/impacts/Impact6.js +105 -0
- package/dist/core/module/battle/skill/impacts/Impact7.d.ts +13 -0
- package/dist/core/module/battle/skill/impacts/Impact7.js +40 -0
- package/dist/core/module/battle/skill/impacts/Impact8.d.ts +10 -0
- package/dist/core/module/battle/skill/impacts/Impact8.js +28 -0
- package/dist/core/module/battle/skill/impacts/Impact9.d.ts +10 -0
- package/dist/core/module/battle/skill/impacts/Impact9.js +32 -0
- package/dist/core/module/battle/skill/impacts/Impact99.d.ts +13 -0
- package/dist/core/module/battle/skill/impacts/Impact99.js +40 -0
- package/dist/core/module/battle/skill/impacts/ImpactRegistry.d.ts +10 -0
- package/dist/core/module/battle/skill/impacts/ImpactRegistry.js +28 -0
- package/dist/core/module/battle/skill/impacts/SkillImpact.d.ts +25 -0
- package/dist/core/module/battle/skill/impacts/SkillImpact.js +33 -0
- package/dist/core/module/battle/skill/impacts/SkillImpactShared.d.ts +3 -0
- package/dist/core/module/battle/skill/impacts/SkillImpactShared.js +6 -0
- package/dist/core/module/battle/skill/impacts/index.d.ts +23 -0
- package/dist/core/module/battle/skill/impacts/index.js +35 -0
- package/dist/core/module/battle/skill/pool/SkillEmitterPool.d.ts +10 -0
- package/dist/core/module/battle/skill/pool/SkillEmitterPool.js +30 -0
- package/dist/core/module/battle/skill/pool/SkillImpactPool.d.ts +13 -0
- package/dist/core/module/battle/skill/pool/SkillImpactPool.js +45 -0
- package/dist/core/module/battle/system/BornSystem.d.ts +32 -0
- package/dist/core/module/battle/system/BornSystem.js +776 -0
- package/dist/core/module/battle/system/BuffSystem.d.ts +35 -0
- package/dist/core/module/battle/system/BuffSystem.js +431 -0
- package/dist/core/module/battle/system/CollisionSystem.d.ts +78 -0
- package/dist/core/module/battle/system/CollisionSystem.js +638 -0
- package/dist/core/module/battle/system/DebugSystem.d.ts +21 -0
- package/dist/core/module/battle/system/DebugSystem.js +42 -0
- package/dist/core/module/battle/system/DestroySystem.d.ts +13 -0
- package/dist/core/module/battle/system/DestroySystem.js +84 -0
- package/dist/core/module/battle/system/EntityBoundsSystem.d.ts +9 -0
- package/dist/core/module/battle/system/EntityBoundsSystem.js +32 -0
- package/dist/core/module/battle/system/FsmSystem.d.ts +12 -0
- package/dist/core/module/battle/system/FsmSystem.js +41 -0
- package/dist/core/module/battle/system/GameSystem.d.ts +12 -0
- package/dist/core/module/battle/system/GameSystem.js +10 -0
- package/dist/core/module/battle/system/InputSystem.d.ts +21 -0
- package/dist/core/module/battle/system/InputSystem.js +146 -0
- package/dist/core/module/battle/system/MarkCaptureSystem.d.ts +9 -0
- package/dist/core/module/battle/system/MarkCaptureSystem.js +25 -0
- package/dist/core/module/battle/system/ProjectileSystem.d.ts +23 -0
- package/dist/core/module/battle/system/ProjectileSystem.js +301 -0
- package/dist/core/module/battle/system/SkillSystem.d.ts +92 -0
- package/dist/core/module/battle/system/SkillSystem.js +393 -0
- package/dist/core/module/battle/system/TimeSystem.d.ts +7 -0
- package/dist/core/module/battle/system/TimeSystem.js +14 -0
- package/dist/core/module/battle/target/CloseAngleTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/CloseAngleTargetSelection.js +54 -0
- package/dist/core/module/battle/target/CloseDownTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/CloseDownTargetSelection.js +63 -0
- package/dist/core/module/battle/target/CloseTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/CloseTargetSelection.js +65 -0
- package/dist/core/module/battle/target/FarTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/FarTargetSelection.js +54 -0
- package/dist/core/module/battle/target/PriorityBossTargetSelection.js +52 -0
- package/dist/core/module/battle/target/PriorityTypeTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/PriorityTypeTargetSelection.js +74 -0
- package/dist/core/module/battle/target/RandomRangeTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/RandomRangeTargetSelection.js +42 -0
- package/dist/core/module/battle/target/RandomTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/RandomTargetSelection.js +50 -0
- package/dist/core/module/battle/target/RectRandomTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/RectRandomTargetSelection.js +25 -0
- package/dist/core/module/battle/target/SelfRandomTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/SelfRandomTargetSelection.js +48 -0
- package/dist/core/module/battle/target/SelfRandomTowerTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/SelfRandomTowerTargetSelection.js +33 -0
- package/dist/core/module/battle/target/SelfRoleTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/SelfRoleTargetSelection.js +13 -0
- package/dist/core/module/battle/target/SelfTargetSelection.d.ts +4 -0
- package/dist/core/module/battle/target/SelfTargetSelection.js +12 -0
- package/dist/core/module/battle/target/TargetSelection.d.ts +16 -0
- package/dist/core/module/battle/target/TargetSelection.js +43 -0
- package/dist/core/module/battle/target/index.d.ts +12 -0
- package/dist/core/module/battle/target/index.js +24 -0
- package/dist/core/module/battle/util/BRect.d.ts +18 -0
- package/dist/core/module/battle/util/BRect.js +26 -0
- package/dist/core/module/battle/util/BSize.d.ts +10 -0
- package/dist/core/module/battle/util/BSize.js +12 -0
- package/dist/core/module/battle/util/BVec2.d.ts +58 -0
- package/dist/core/module/battle/util/BVec2.js +247 -0
- package/dist/core/module/battle/util/BattleAudioAdpater.d.ts +4 -0
- package/dist/core/module/battle/util/BattleAudioAdpater.js +10 -0
- package/dist/core/module/battle/util/BattleConfig.d.ts +10 -0
- package/dist/core/module/battle/util/BattleConfig.js +25 -0
- package/dist/core/module/battle/util/BattleInputCodec.d.ts +35 -0
- package/dist/core/module/battle/util/BattleInputCodec.js +184 -0
- package/dist/core/module/battle/util/BattleUtils.d.ts +46 -0
- package/dist/core/module/battle/util/BattleUtils.js +501 -0
- package/dist/core/module/battle/util/EllipseArc.d.ts +3 -0
- package/dist/core/module/battle/util/EllipseArc.js +95 -0
- package/dist/core/module/battle/util/Hash.d.ts +7 -0
- package/dist/core/module/battle/util/Hash.js +44 -0
- package/dist/core/module/battle/util/HitDataPool.d.ts +44 -0
- package/dist/core/module/battle/util/HitDataPool.js +97 -0
- package/dist/core/module/battle/util/Intersection.d.ts +151 -0
- package/dist/core/module/battle/util/Intersection.js +696 -0
- package/dist/core/module/battle/util/JMath.d.ts +30 -0
- package/dist/core/module/battle/util/JMath.js +239 -0
- package/dist/core/module/battle/util/Random.d.ts +23 -0
- package/dist/core/module/battle/util/Random.js +113 -0
- package/dist/core/module/battle/util/SkillEffectByIdParamsPool.d.ts +3 -0
- package/dist/core/module/battle/util/SkillEffectByIdParamsPool.js +34 -0
- package/dist/core/module/guild/view/boss/GuildBossBattleModule.d.ts +29 -0
- package/dist/core/module/guild/view/boss/GuildBossBattleModule.js +216 -0
- package/dist/core/module/guild/view/boss/index.d.ts +1 -0
- package/dist/core/module/guild/view/boss/index.js +13 -0
- package/dist/core/module/module.interface.d.ts +134 -0
- package/dist/core/module/module.interface.js +44 -0
- package/dist/core/module/property/Property.d.ts +61 -0
- package/dist/core/module/property/Property.js +239 -0
- package/dist/core/module/property/PropertyUtil.d.ts +61 -0
- package/dist/core/module/property/PropertyUtil.js +284 -0
- package/dist/core/module/relicDungeon/RelicBattleModule.d.ts +11 -0
- package/dist/core/module/relicDungeon/RelicBattleModule.js +100 -0
- package/dist/core/module/relicDungeon/index.d.ts +1 -0
- package/dist/core/module/relicDungeon/index.js +13 -0
- package/dist/core/module/stage/StageBattleModule.d.ts +11 -0
- package/dist/core/module/stage/StageBattleModule.js +105 -0
- package/dist/core/module/stage/index.d.ts +1 -0
- package/dist/core/module/stage/index.js +13 -0
- package/dist/core/proto/CommonProto.d.ts +45098 -0
- package/dist/core/proto/Proto.d.ts +1016 -0
- package/dist/core/util/BattlePlayerUtil.d.ts +14 -0
- package/dist/core/util/BattlePlayerUtil.js +23 -0
- package/dist/core/util/DeepCopy.d.ts +1 -0
- package/dist/core/util/DeepCopy.js +28 -0
- package/dist/core/util/GameUtil.d.ts +213 -0
- package/dist/core/util/GameUtil.js +922 -0
- package/dist/core/util/lz-string.d.ts +12 -0
- package/dist/core/util/lz-string.js +471 -0
- package/dist/core/util/pako_inflate.d.ts +2 -0
- package/dist/core/util/pako_inflate.js +655 -0
- package/dist/db-url-resolver.js +57 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +278 -0
- package/dist/register-all.d.ts +10 -0
- package/dist/register-all.js +28 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/node_modules/cc/dist/index.d.ts +407 -0
- package/node_modules/cc/dist/index.js +1139 -0
- package/node_modules/cc/package.json +23 -0
- package/node_modules/cc/src/index.ts +1230 -0
- package/package.json +61 -4
- package/resources/config/GameJsonCfg.bin +0 -0
|
@@ -0,0 +1,1185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.sign = exports.randomRangeInt = exports.randomRange = exports.toDegree = exports.toRadian = exports.clamp01 = exports.clamp = exports.lerp = exports.DEG = exports.RAD = exports.TWO_PI = exports.HALF_PI = exports.PI = exports.EPSILON = exports.Vec3 = exports.Vec2 = exports.resources = exports.assetManager = exports.Bundle = exports.BufferAsset = exports.TextAsset = exports.JsonAsset = exports.Asset = exports.ProgressBar = exports.Label = exports.Node = exports.Component = exports._decorator = exports.CCString = exports.CCBoolean = exports.CCFloat = exports.CCInteger = exports.director = exports.Scheduler = exports.EventTarget = exports.math = exports.js = void 0;
|
|
37
|
+
exports.log = log;
|
|
38
|
+
exports.warn = warn;
|
|
39
|
+
exports.error = error;
|
|
40
|
+
/**
|
|
41
|
+
* cc —— Cocos Creator 引擎 API 在 Node 侧的替身实现
|
|
42
|
+
*
|
|
43
|
+
* 为什么需要它:core/ 是从 Cocos Creator 工程里抽出的战斗逻辑,源码里到处写
|
|
44
|
+
* `import { ... } from "cc"`。Node 里没有引擎,这层替身把用到的 API 按原语义补齐,
|
|
45
|
+
* 让战斗逻辑能脱离引擎跑(离线复算战斗、和回放对 hash、跑单测)。
|
|
46
|
+
*
|
|
47
|
+
* 三条原则:
|
|
48
|
+
* 1. 逻辑侧真实现。log/warn/error、js、math、director + Scheduler 是全真的,
|
|
49
|
+
* Node 下和引擎行为一致,拿到就能用。
|
|
50
|
+
* 2. 引擎侧不撒谎。Node/Vec3/资源这些只做到"能构造、不崩、语义可预期";
|
|
51
|
+
* 没实现的 API 一律不导出——用到了在编译期就报错,而不是运行期悄悄给 undefined。
|
|
52
|
+
* 3. 零依赖。只用 Node 自带能力;`node:fs` 在真要读盘时才动态 import,
|
|
53
|
+
* 保证 `import "cc"` 本身在任何宿主里都不会有副作用。
|
|
54
|
+
*
|
|
55
|
+
* 只覆盖本项目实际用到的子集,不是引擎的完整实现。以后补 API 请照引擎原语义写,
|
|
56
|
+
* 别按调用点的巧合行为写。
|
|
57
|
+
*
|
|
58
|
+
* 放在单文件里是有意的:编译产物是 ESM,一旦拆成多个文件,相对 import 就得带
|
|
59
|
+
* `.js` 后缀 Node 才解析得了;这里没有相对 import,省掉这个坑。
|
|
60
|
+
*/
|
|
61
|
+
/* -------------------------------------------------------------------------- */
|
|
62
|
+
/* 日志:log / warn / error */
|
|
63
|
+
/* -------------------------------------------------------------------------- */
|
|
64
|
+
/*
|
|
65
|
+
* 引擎的 log/warn/error 支持 printf 风格占位符(%s/%d/%i/%f/%j/%o/%O/%%),
|
|
66
|
+
* 且只在第一个参数是字符串时按占位符吃后面的参数。
|
|
67
|
+
* Node 的 console 是同一套规则,所以这里直接转发,不做二次格式化——
|
|
68
|
+
* 自己实现反而会在 "%s" 和普通 "%" 混用时和引擎对不上。
|
|
69
|
+
*/
|
|
70
|
+
function log(...args) {
|
|
71
|
+
console.log(...args);
|
|
72
|
+
}
|
|
73
|
+
function warn(...args) {
|
|
74
|
+
console.warn(...args);
|
|
75
|
+
}
|
|
76
|
+
function error(...args) {
|
|
77
|
+
console.error(...args);
|
|
78
|
+
}
|
|
79
|
+
/* -------------------------------------------------------------------------- */
|
|
80
|
+
/* js 命名空间 */
|
|
81
|
+
/* -------------------------------------------------------------------------- */
|
|
82
|
+
const _classByName = new Map();
|
|
83
|
+
const _classById = new Map();
|
|
84
|
+
(function (js) {
|
|
85
|
+
/**
|
|
86
|
+
* 建一个纯字典对象。
|
|
87
|
+
* 引擎里返回 Object.create(null),不受原型链干扰——当 map 用时
|
|
88
|
+
* `obj["toString"]` 这类键名不会误命中 Object.prototype 上的东西。
|
|
89
|
+
*/
|
|
90
|
+
function createMap(forceDictMode) {
|
|
91
|
+
const map = Object.create(null);
|
|
92
|
+
if (forceDictMode) {
|
|
93
|
+
// 强制字典模式下把三个危险键占成不可枚举属性,挡住原型链入口
|
|
94
|
+
for (const key of ["__proto__", "constructor", "prototype"]) {
|
|
95
|
+
Object.defineProperty(map, key, {
|
|
96
|
+
value: undefined,
|
|
97
|
+
enumerable: false,
|
|
98
|
+
writable: true,
|
|
99
|
+
configurable: true,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return map;
|
|
104
|
+
}
|
|
105
|
+
js.createMap = createMap;
|
|
106
|
+
function getClassName(target) {
|
|
107
|
+
if (target == null)
|
|
108
|
+
return "";
|
|
109
|
+
return target.__classname__ || target.name || "";
|
|
110
|
+
}
|
|
111
|
+
js.getClassName = getClassName;
|
|
112
|
+
function setClassName(target, name) {
|
|
113
|
+
if (target == null)
|
|
114
|
+
return;
|
|
115
|
+
target.__classname__ = name;
|
|
116
|
+
}
|
|
117
|
+
js.setClassName = setClassName;
|
|
118
|
+
function getClassByName(name) {
|
|
119
|
+
return _classByName.get(name) || null;
|
|
120
|
+
}
|
|
121
|
+
js.getClassByName = getClassByName;
|
|
122
|
+
function getClassById(id) {
|
|
123
|
+
return _classById.get(id) || null;
|
|
124
|
+
}
|
|
125
|
+
js.getClassById = getClassById;
|
|
126
|
+
function setClassId(id, constructor) {
|
|
127
|
+
_classById.set(id, constructor);
|
|
128
|
+
}
|
|
129
|
+
js.setClassId = setClassId;
|
|
130
|
+
function isChildClassOf(subclass, superclass) {
|
|
131
|
+
if (typeof subclass !== "function" || typeof superclass !== "function")
|
|
132
|
+
return false;
|
|
133
|
+
if (subclass === superclass)
|
|
134
|
+
return true;
|
|
135
|
+
if (superclass === Object)
|
|
136
|
+
return true;
|
|
137
|
+
let proto = subclass;
|
|
138
|
+
while (proto) {
|
|
139
|
+
proto = Object.getPrototypeOf(proto);
|
|
140
|
+
if (proto === superclass)
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
js.isChildClassOf = isChildClassOf;
|
|
146
|
+
function isCCClassOrFastDefined(obj) {
|
|
147
|
+
return !!(obj && obj.__isCCClass__);
|
|
148
|
+
}
|
|
149
|
+
js.isCCClassOrFastDefined = isCCClassOrFastDefined;
|
|
150
|
+
/** 把 src 的自有属性(含访问器)拷到 dst,同名的不覆盖 */
|
|
151
|
+
function mixin(dst, src) {
|
|
152
|
+
if (!src)
|
|
153
|
+
return dst;
|
|
154
|
+
for (const key of Object.getOwnPropertyNames(src)) {
|
|
155
|
+
if (key === "constructor" || key in dst)
|
|
156
|
+
continue;
|
|
157
|
+
const desc = Object.getOwnPropertyDescriptor(src, key);
|
|
158
|
+
if (desc)
|
|
159
|
+
Object.defineProperty(dst, key, desc);
|
|
160
|
+
}
|
|
161
|
+
return dst;
|
|
162
|
+
}
|
|
163
|
+
js.mixin = mixin;
|
|
164
|
+
/** 和 mixin 的唯一区别是它会覆盖同名属性 */
|
|
165
|
+
function addon(dst, src) {
|
|
166
|
+
if (!src)
|
|
167
|
+
return dst;
|
|
168
|
+
for (const key of Object.getOwnPropertyNames(src)) {
|
|
169
|
+
if (key === "constructor")
|
|
170
|
+
continue;
|
|
171
|
+
const desc = Object.getOwnPropertyDescriptor(src, key);
|
|
172
|
+
if (desc)
|
|
173
|
+
Object.defineProperty(dst, key, desc);
|
|
174
|
+
}
|
|
175
|
+
return dst;
|
|
176
|
+
}
|
|
177
|
+
js.addon = addon;
|
|
178
|
+
function clear(obj) {
|
|
179
|
+
if (!obj)
|
|
180
|
+
return;
|
|
181
|
+
for (const key of Object.keys(obj))
|
|
182
|
+
delete obj[key];
|
|
183
|
+
}
|
|
184
|
+
js.clear = clear;
|
|
185
|
+
let array;
|
|
186
|
+
(function (array_1) {
|
|
187
|
+
function remove(array, value) {
|
|
188
|
+
const index = array.indexOf(value);
|
|
189
|
+
if (index < 0)
|
|
190
|
+
return false;
|
|
191
|
+
array.splice(index, 1);
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
array_1.remove = remove;
|
|
195
|
+
function removeIf(array, predicate) {
|
|
196
|
+
for (let i = array.length - 1; i >= 0; --i) {
|
|
197
|
+
if (predicate(array[i], i))
|
|
198
|
+
array.splice(i, 1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
array_1.removeIf = removeIf;
|
|
202
|
+
function append(array, value) {
|
|
203
|
+
array.push(value);
|
|
204
|
+
}
|
|
205
|
+
array_1.append = append;
|
|
206
|
+
function appendArray(array, values) {
|
|
207
|
+
if (!values)
|
|
208
|
+
return;
|
|
209
|
+
for (const value of values)
|
|
210
|
+
array.push(value);
|
|
211
|
+
}
|
|
212
|
+
array_1.appendArray = appendArray;
|
|
213
|
+
/** 用末位元素填洞顶掉被删元素,不保序但省去 splice 的整体搬移 */
|
|
214
|
+
function fastRemove(array, value) {
|
|
215
|
+
fastRemoveAt(array, array.indexOf(value));
|
|
216
|
+
}
|
|
217
|
+
array_1.fastRemove = fastRemove;
|
|
218
|
+
function fastRemoveAt(array, index) {
|
|
219
|
+
if (index < 0 || index >= array.length)
|
|
220
|
+
return;
|
|
221
|
+
const last = array.length - 1;
|
|
222
|
+
if (index !== last)
|
|
223
|
+
array[index] = array[last];
|
|
224
|
+
array.length = last;
|
|
225
|
+
}
|
|
226
|
+
array_1.fastRemoveAt = fastRemoveAt;
|
|
227
|
+
function contains(array, value) {
|
|
228
|
+
return array.indexOf(value) >= 0;
|
|
229
|
+
}
|
|
230
|
+
array_1.contains = contains;
|
|
231
|
+
function verifyType(array, type, allowNull) {
|
|
232
|
+
for (const value of array) {
|
|
233
|
+
if (value == null) {
|
|
234
|
+
if (!allowNull)
|
|
235
|
+
return false;
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
if (!(value instanceof type))
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
array_1.verifyType = verifyType;
|
|
244
|
+
function removeArray(array, values) {
|
|
245
|
+
if (!values)
|
|
246
|
+
return;
|
|
247
|
+
for (const value of values)
|
|
248
|
+
remove(array, value);
|
|
249
|
+
}
|
|
250
|
+
array_1.removeArray = removeArray;
|
|
251
|
+
function copy(array) {
|
|
252
|
+
return array.slice();
|
|
253
|
+
}
|
|
254
|
+
array_1.copy = copy;
|
|
255
|
+
})(array = js.array || (js.array = {}));
|
|
256
|
+
/** 登记类名,getClassByName 才找得回来 */
|
|
257
|
+
function registerClass(constructor) {
|
|
258
|
+
_classByName.set(getClassName(constructor), constructor);
|
|
259
|
+
}
|
|
260
|
+
js.registerClass = registerClass;
|
|
261
|
+
})(exports.js || (exports.js = {}));
|
|
262
|
+
(function (math) {
|
|
263
|
+
math.EPSILON = 0.000001;
|
|
264
|
+
math.PI = Math.PI;
|
|
265
|
+
math.HALF_PI = Math.PI / 2;
|
|
266
|
+
math.TWO_PI = Math.PI * 2;
|
|
267
|
+
math.RAD = Math.PI / 180;
|
|
268
|
+
math.DEG = 180 / Math.PI;
|
|
269
|
+
class Vec2 {
|
|
270
|
+
static ZERO = Object.freeze(new Vec2(0, 0));
|
|
271
|
+
static ONE = Object.freeze(new Vec2(1, 1));
|
|
272
|
+
static UP = Object.freeze(new Vec2(0, 1));
|
|
273
|
+
static RIGHT = Object.freeze(new Vec2(1, 0));
|
|
274
|
+
x;
|
|
275
|
+
y;
|
|
276
|
+
constructor(x = 0, y = 0) {
|
|
277
|
+
this.x = x;
|
|
278
|
+
this.y = y;
|
|
279
|
+
}
|
|
280
|
+
clone() { return new Vec2(this.x, this.y); }
|
|
281
|
+
set(x, y) {
|
|
282
|
+
if (typeof x === "object") {
|
|
283
|
+
this.x = x.x;
|
|
284
|
+
this.y = x.y;
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
this.x = x;
|
|
288
|
+
this.y = y;
|
|
289
|
+
}
|
|
290
|
+
return this;
|
|
291
|
+
}
|
|
292
|
+
copy(other) { return this.set(other.x, other.y); }
|
|
293
|
+
add(other) {
|
|
294
|
+
this.x += other.x;
|
|
295
|
+
this.y += other.y;
|
|
296
|
+
return this;
|
|
297
|
+
}
|
|
298
|
+
subtract(other) {
|
|
299
|
+
this.x -= other.x;
|
|
300
|
+
this.y -= other.y;
|
|
301
|
+
return this;
|
|
302
|
+
}
|
|
303
|
+
multiplyScalar(scale) {
|
|
304
|
+
this.x *= scale;
|
|
305
|
+
this.y *= scale;
|
|
306
|
+
return this;
|
|
307
|
+
}
|
|
308
|
+
divideScalar(scale) {
|
|
309
|
+
if (scale === 0)
|
|
310
|
+
return this.multiplyScalar(0);
|
|
311
|
+
this.x /= scale;
|
|
312
|
+
this.y /= scale;
|
|
313
|
+
return this;
|
|
314
|
+
}
|
|
315
|
+
negative() {
|
|
316
|
+
this.x = -this.x;
|
|
317
|
+
this.y = -this.y;
|
|
318
|
+
return this;
|
|
319
|
+
}
|
|
320
|
+
length() { return Math.sqrt(this.x * this.x + this.y * this.y); }
|
|
321
|
+
lengthSqr() { return this.x * this.x + this.y * this.y; }
|
|
322
|
+
normalize() {
|
|
323
|
+
const len = this.length();
|
|
324
|
+
if (len > 0)
|
|
325
|
+
this.divideScalar(len);
|
|
326
|
+
return this;
|
|
327
|
+
}
|
|
328
|
+
dot(other) { return this.x * other.x + this.y * other.y; }
|
|
329
|
+
cross(other) { return this.x * other.y - this.y * other.x; }
|
|
330
|
+
lerp(to, ratio) {
|
|
331
|
+
this.x = this.x + (to.x - this.x) * ratio;
|
|
332
|
+
this.y = this.y + (to.y - this.y) * ratio;
|
|
333
|
+
return this;
|
|
334
|
+
}
|
|
335
|
+
equals(other, epsilon = 0) {
|
|
336
|
+
return Math.abs(this.x - other.x) <= epsilon && Math.abs(this.y - other.y) <= epsilon;
|
|
337
|
+
}
|
|
338
|
+
toString() { return `(${this.x}, ${this.y})`; }
|
|
339
|
+
static lerp(out, from, to, ratio) {
|
|
340
|
+
return out.set(from.x + (to.x - from.x) * ratio, from.y + (to.y - from.y) * ratio);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
math.Vec2 = Vec2;
|
|
344
|
+
class Vec3 {
|
|
345
|
+
static ZERO = Object.freeze(new Vec3(0, 0, 0));
|
|
346
|
+
static ONE = Object.freeze(new Vec3(1, 1, 1));
|
|
347
|
+
static NEG_ONE = Object.freeze(new Vec3(-1, -1, -1));
|
|
348
|
+
static UP = Object.freeze(new Vec3(0, 1, 0));
|
|
349
|
+
static DOWN = Object.freeze(new Vec3(0, -1, 0));
|
|
350
|
+
static LEFT = Object.freeze(new Vec3(-1, 0, 0));
|
|
351
|
+
static RIGHT = Object.freeze(new Vec3(1, 0, 0));
|
|
352
|
+
static FORWARD = Object.freeze(new Vec3(0, 0, -1));
|
|
353
|
+
static BACK = Object.freeze(new Vec3(0, 0, 1));
|
|
354
|
+
x;
|
|
355
|
+
y;
|
|
356
|
+
z;
|
|
357
|
+
constructor(x = 0, y = 0, z = 0) {
|
|
358
|
+
this.x = x;
|
|
359
|
+
this.y = y;
|
|
360
|
+
this.z = z;
|
|
361
|
+
}
|
|
362
|
+
clone() { return new Vec3(this.x, this.y, this.z); }
|
|
363
|
+
set(x, y, z) {
|
|
364
|
+
if (typeof x === "object") {
|
|
365
|
+
this.x = x.x;
|
|
366
|
+
this.y = x.y;
|
|
367
|
+
this.z = x.z;
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
this.x = x;
|
|
371
|
+
this.y = y;
|
|
372
|
+
this.z = z;
|
|
373
|
+
}
|
|
374
|
+
return this;
|
|
375
|
+
}
|
|
376
|
+
copy(other) { return this.set(other.x, other.y, other.z); }
|
|
377
|
+
add(other) {
|
|
378
|
+
this.x += other.x;
|
|
379
|
+
this.y += other.y;
|
|
380
|
+
this.z += other.z;
|
|
381
|
+
return this;
|
|
382
|
+
}
|
|
383
|
+
add3f(x, y, z) {
|
|
384
|
+
this.x += x;
|
|
385
|
+
this.y += y;
|
|
386
|
+
this.z += z;
|
|
387
|
+
return this;
|
|
388
|
+
}
|
|
389
|
+
subtract(other) {
|
|
390
|
+
this.x -= other.x;
|
|
391
|
+
this.y -= other.y;
|
|
392
|
+
this.z -= other.z;
|
|
393
|
+
return this;
|
|
394
|
+
}
|
|
395
|
+
multiply(other) {
|
|
396
|
+
this.x *= other.x;
|
|
397
|
+
this.y *= other.y;
|
|
398
|
+
this.z *= other.z;
|
|
399
|
+
return this;
|
|
400
|
+
}
|
|
401
|
+
multiplyScalar(scale) {
|
|
402
|
+
this.x *= scale;
|
|
403
|
+
this.y *= scale;
|
|
404
|
+
this.z *= scale;
|
|
405
|
+
return this;
|
|
406
|
+
}
|
|
407
|
+
divide(other) {
|
|
408
|
+
this.x /= other.x;
|
|
409
|
+
this.y /= other.y;
|
|
410
|
+
this.z /= other.z;
|
|
411
|
+
return this;
|
|
412
|
+
}
|
|
413
|
+
divideScalar(scale) {
|
|
414
|
+
if (scale === 0)
|
|
415
|
+
return this.multiplyScalar(0);
|
|
416
|
+
this.x /= scale;
|
|
417
|
+
this.y /= scale;
|
|
418
|
+
this.z /= scale;
|
|
419
|
+
return this;
|
|
420
|
+
}
|
|
421
|
+
negative() {
|
|
422
|
+
this.x = -this.x;
|
|
423
|
+
this.y = -this.y;
|
|
424
|
+
this.z = -this.z;
|
|
425
|
+
return this;
|
|
426
|
+
}
|
|
427
|
+
length() { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); }
|
|
428
|
+
lengthSqr() { return this.x * this.x + this.y * this.y + this.z * this.z; }
|
|
429
|
+
normalize() {
|
|
430
|
+
const len = this.length();
|
|
431
|
+
if (len > 0)
|
|
432
|
+
this.divideScalar(len);
|
|
433
|
+
return this;
|
|
434
|
+
}
|
|
435
|
+
dot(other) {
|
|
436
|
+
return this.x * other.x + this.y * other.y + this.z * other.z;
|
|
437
|
+
}
|
|
438
|
+
cross(other) {
|
|
439
|
+
const ax = this.x, ay = this.y, az = this.z;
|
|
440
|
+
const bx = other.x, by = other.y, bz = other.z;
|
|
441
|
+
this.x = ay * bz - az * by;
|
|
442
|
+
this.y = az * bx - ax * bz;
|
|
443
|
+
this.z = ax * by - ay * bx;
|
|
444
|
+
return this;
|
|
445
|
+
}
|
|
446
|
+
lerp(to, ratio) {
|
|
447
|
+
this.x = this.x + (to.x - this.x) * ratio;
|
|
448
|
+
this.y = this.y + (to.y - this.y) * ratio;
|
|
449
|
+
this.z = this.z + (to.z - this.z) * ratio;
|
|
450
|
+
return this;
|
|
451
|
+
}
|
|
452
|
+
equals(other, epsilon = 0) {
|
|
453
|
+
return Math.abs(this.x - other.x) <= epsilon
|
|
454
|
+
&& Math.abs(this.y - other.y) <= epsilon
|
|
455
|
+
&& Math.abs(this.z - other.z) <= epsilon;
|
|
456
|
+
}
|
|
457
|
+
toString() { return `(${this.x}, ${this.y}, ${this.z})`; }
|
|
458
|
+
toArray(out = [], offset = 0) {
|
|
459
|
+
out[offset] = this.x;
|
|
460
|
+
out[offset + 1] = this.y;
|
|
461
|
+
out[offset + 2] = this.z;
|
|
462
|
+
return out;
|
|
463
|
+
}
|
|
464
|
+
fromArray(array, offset = 0) {
|
|
465
|
+
this.x = array[offset];
|
|
466
|
+
this.y = array[offset + 1];
|
|
467
|
+
this.z = array[offset + 2];
|
|
468
|
+
return this;
|
|
469
|
+
}
|
|
470
|
+
static add(out, a, b) {
|
|
471
|
+
return out.set(a.x + b.x, a.y + b.y, a.z + b.z);
|
|
472
|
+
}
|
|
473
|
+
static subtract(out, a, b) {
|
|
474
|
+
return out.set(a.x - b.x, a.y - b.y, a.z - b.z);
|
|
475
|
+
}
|
|
476
|
+
static multiplyScalar(out, a, scale) {
|
|
477
|
+
return out.set(a.x * scale, a.y * scale, a.z * scale);
|
|
478
|
+
}
|
|
479
|
+
static dot(a, b) {
|
|
480
|
+
return a.x * b.x + a.y * b.y + a.z * b.z;
|
|
481
|
+
}
|
|
482
|
+
static cross(out, a, b) {
|
|
483
|
+
return out.set(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);
|
|
484
|
+
}
|
|
485
|
+
static lerp(out, from, to, ratio) {
|
|
486
|
+
return out.set(from.x + (to.x - from.x) * ratio, from.y + (to.y - from.y) * ratio, from.z + (to.z - from.z) * ratio);
|
|
487
|
+
}
|
|
488
|
+
static distance(a, b) {
|
|
489
|
+
const dx = a.x - b.x, dy = a.y - b.y, dz = a.z - b.z;
|
|
490
|
+
return Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
491
|
+
}
|
|
492
|
+
static normalize(out, a) {
|
|
493
|
+
return out.set(a).normalize();
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
math.Vec3 = Vec3;
|
|
497
|
+
/** 引擎的 lerp 不做钳制,ratio 超出 [0,1] 会外推 */
|
|
498
|
+
function lerp(from, to, ratio) {
|
|
499
|
+
return from + (to - from) * ratio;
|
|
500
|
+
}
|
|
501
|
+
math.lerp = lerp;
|
|
502
|
+
function clamp(value, min, max) {
|
|
503
|
+
if (value < min)
|
|
504
|
+
return min;
|
|
505
|
+
if (value > max)
|
|
506
|
+
return max;
|
|
507
|
+
return value;
|
|
508
|
+
}
|
|
509
|
+
math.clamp = clamp;
|
|
510
|
+
function clamp01(value) {
|
|
511
|
+
if (value < 0)
|
|
512
|
+
return 0;
|
|
513
|
+
if (value > 1)
|
|
514
|
+
return 1;
|
|
515
|
+
return value;
|
|
516
|
+
}
|
|
517
|
+
math.clamp01 = clamp01;
|
|
518
|
+
function toRadian(degree) {
|
|
519
|
+
return degree * math.RAD;
|
|
520
|
+
}
|
|
521
|
+
math.toRadian = toRadian;
|
|
522
|
+
function toDegree(radian) {
|
|
523
|
+
return radian * math.DEG;
|
|
524
|
+
}
|
|
525
|
+
math.toDegree = toDegree;
|
|
526
|
+
function randomRange(min, max) {
|
|
527
|
+
if (max === undefined) {
|
|
528
|
+
max = min;
|
|
529
|
+
min = 0;
|
|
530
|
+
}
|
|
531
|
+
return min + Math.random() * (max - min);
|
|
532
|
+
}
|
|
533
|
+
math.randomRange = randomRange;
|
|
534
|
+
/** 闭区间 [min, max] */
|
|
535
|
+
function randomRangeInt(min, max) {
|
|
536
|
+
if (max === undefined) {
|
|
537
|
+
max = min;
|
|
538
|
+
min = 0;
|
|
539
|
+
}
|
|
540
|
+
return Math.floor(min + Math.random() * (max - min + 1));
|
|
541
|
+
}
|
|
542
|
+
math.randomRangeInt = randomRangeInt;
|
|
543
|
+
function sign(value) {
|
|
544
|
+
return value < 0 ? -1 : (value > 0 ? 1 : 0);
|
|
545
|
+
}
|
|
546
|
+
math.sign = sign;
|
|
547
|
+
})(exports.math || (exports.math = {}));
|
|
548
|
+
/** 引擎的 EventTarget。Node / director 都靠它做 on/off/emit */
|
|
549
|
+
class EventTarget {
|
|
550
|
+
_listeners = null;
|
|
551
|
+
on(type, callback, target) {
|
|
552
|
+
this._addListener(type, callback, target, false);
|
|
553
|
+
}
|
|
554
|
+
once(type, callback, target) {
|
|
555
|
+
this._addListener(type, callback, target, true);
|
|
556
|
+
}
|
|
557
|
+
_addListener(type, callback, target, once) {
|
|
558
|
+
if (typeof callback !== "function") {
|
|
559
|
+
error(`EventTarget.on("${type}"): callback 必须是函数`);
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
if (!this._listeners)
|
|
563
|
+
this._listeners = new Map();
|
|
564
|
+
let list = this._listeners.get(type);
|
|
565
|
+
if (!list) {
|
|
566
|
+
list = [];
|
|
567
|
+
this._listeners.set(type, list);
|
|
568
|
+
}
|
|
569
|
+
list.push({ callback, target, once });
|
|
570
|
+
}
|
|
571
|
+
/** 不传 callback 就摘掉这个 type 下的全部监听 */
|
|
572
|
+
off(type, callback, target) {
|
|
573
|
+
const list = this._listeners && this._listeners.get(type);
|
|
574
|
+
if (!list)
|
|
575
|
+
return;
|
|
576
|
+
if (!callback) {
|
|
577
|
+
this._listeners.delete(type);
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
for (let i = list.length - 1; i >= 0; --i) {
|
|
581
|
+
const item = list[i];
|
|
582
|
+
if (item.callback === callback && (target === undefined || item.target === target)) {
|
|
583
|
+
list.splice(i, 1);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
if (list.length === 0)
|
|
587
|
+
this._listeners.delete(type);
|
|
588
|
+
}
|
|
589
|
+
/** 摘掉某个 target 注册的全部监听,引擎里主要在对象销毁时做清理 */
|
|
590
|
+
targetOff(target) {
|
|
591
|
+
if (!this._listeners)
|
|
592
|
+
return;
|
|
593
|
+
for (const [type, list] of this._listeners) {
|
|
594
|
+
for (let i = list.length - 1; i >= 0; --i) {
|
|
595
|
+
if (list[i].target === target)
|
|
596
|
+
list.splice(i, 1);
|
|
597
|
+
}
|
|
598
|
+
if (list.length === 0)
|
|
599
|
+
this._listeners.delete(type);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
emit(type, ...args) {
|
|
603
|
+
const list = this._listeners && this._listeners.get(type);
|
|
604
|
+
if (!list || list.length === 0)
|
|
605
|
+
return;
|
|
606
|
+
// 先拷一份再遍历:回调里给自己 off 是常见写法,直接遍历原数组会漏掉后面的监听
|
|
607
|
+
for (const item of list.slice()) {
|
|
608
|
+
if (item.once)
|
|
609
|
+
this.off(type, item.callback, item.target);
|
|
610
|
+
item.callback.apply(item.target, args);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
hasEventListener(type, callback, target) {
|
|
614
|
+
const list = this._listeners && this._listeners.get(type);
|
|
615
|
+
if (!list)
|
|
616
|
+
return false;
|
|
617
|
+
if (!callback)
|
|
618
|
+
return list.length > 0;
|
|
619
|
+
return list.some(i => i.callback === callback && (target === undefined || i.target === target));
|
|
620
|
+
}
|
|
621
|
+
removeAllListeners(type) {
|
|
622
|
+
if (!this._listeners)
|
|
623
|
+
return;
|
|
624
|
+
if (type === undefined)
|
|
625
|
+
this._listeners.clear();
|
|
626
|
+
else
|
|
627
|
+
this._listeners.delete(type);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
exports.EventTarget = EventTarget;
|
|
631
|
+
/* -------------------------------------------------------------------------- */
|
|
632
|
+
/* director + Scheduler */
|
|
633
|
+
/* -------------------------------------------------------------------------- */
|
|
634
|
+
/**
|
|
635
|
+
* 引擎里的 Scheduler 负责跑定时器和维护 timeScale。
|
|
636
|
+
* 这里只保留 timeScale —— Time.ts 靠它做全局慢放/加速,是战斗逻辑真的会读写的状态,
|
|
637
|
+
* 所以必须真存真取,不能做成空转的桩。
|
|
638
|
+
*
|
|
639
|
+
* 定时器那部分不走这里:core 里由 Time.ts 自己的 Watcher 实现。
|
|
640
|
+
*/
|
|
641
|
+
class Scheduler {
|
|
642
|
+
_timeScale = 1;
|
|
643
|
+
_paused = false;
|
|
644
|
+
setTimeScale(scale) {
|
|
645
|
+
this._timeScale = scale;
|
|
646
|
+
}
|
|
647
|
+
getTimeScale() {
|
|
648
|
+
return this._timeScale;
|
|
649
|
+
}
|
|
650
|
+
pause() { this._paused = true; }
|
|
651
|
+
resume() { this._paused = false; }
|
|
652
|
+
isPaused() { return this._paused; }
|
|
653
|
+
}
|
|
654
|
+
exports.Scheduler = Scheduler;
|
|
655
|
+
/** 引擎的全局单例 director */
|
|
656
|
+
class Director extends EventTarget {
|
|
657
|
+
static EVENT_BEFORE_UPDATE = "director_before_update";
|
|
658
|
+
static EVENT_AFTER_UPDATE = "director_after_update";
|
|
659
|
+
_scheduler = new Scheduler();
|
|
660
|
+
_deltaTime = 0;
|
|
661
|
+
_totalTime = 0;
|
|
662
|
+
_totalFrames = 0;
|
|
663
|
+
_paused = false;
|
|
664
|
+
getScheduler() {
|
|
665
|
+
return this._scheduler;
|
|
666
|
+
}
|
|
667
|
+
getDeltaTime() { return this._deltaTime; }
|
|
668
|
+
getTotalTime() { return this._totalTime; }
|
|
669
|
+
getTotalFrames() { return this._totalFrames; }
|
|
670
|
+
isPaused() { return this._paused; }
|
|
671
|
+
pause() { this._paused = true; }
|
|
672
|
+
resume() { this._paused = false; }
|
|
673
|
+
/**
|
|
674
|
+
* 非 cc API。
|
|
675
|
+
* 引擎里时间由主循环推进,Node 下没有主循环,所以开这个口子让宿主
|
|
676
|
+
* (战斗模拟的驱动方)手动推帧。
|
|
677
|
+
*
|
|
678
|
+
* dt 不乘 timeScale:引擎里 timeScale 影响的是派发给组件的 dt,由主循环负责,
|
|
679
|
+
* 这里保持原样传入,免得和 core 自己的 Time.ts 重复缩放。
|
|
680
|
+
*/
|
|
681
|
+
tick(dt) {
|
|
682
|
+
if (this._paused)
|
|
683
|
+
return;
|
|
684
|
+
this._deltaTime = dt;
|
|
685
|
+
this._totalTime += dt;
|
|
686
|
+
this._totalFrames += 1;
|
|
687
|
+
this.emit(Director.EVENT_BEFORE_UPDATE, dt);
|
|
688
|
+
this.emit(Director.EVENT_AFTER_UPDATE, dt);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
exports.director = new Director();
|
|
692
|
+
/* -------------------------------------------------------------------------- */
|
|
693
|
+
/* _decorator + 属性类型标记 */
|
|
694
|
+
/* -------------------------------------------------------------------------- */
|
|
695
|
+
class CCInteger {
|
|
696
|
+
value;
|
|
697
|
+
constructor(value) {
|
|
698
|
+
this.value = value;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
exports.CCInteger = CCInteger;
|
|
702
|
+
class CCFloat {
|
|
703
|
+
value;
|
|
704
|
+
constructor(value) {
|
|
705
|
+
this.value = value;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
exports.CCFloat = CCFloat;
|
|
709
|
+
class CCBoolean {
|
|
710
|
+
value;
|
|
711
|
+
constructor(value) {
|
|
712
|
+
this.value = value;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
exports.CCBoolean = CCBoolean;
|
|
716
|
+
class CCString {
|
|
717
|
+
value;
|
|
718
|
+
constructor(value) {
|
|
719
|
+
this.value = value;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
exports.CCString = CCString;
|
|
723
|
+
/** 把属性装饰器的各种写法(@property / @property(Vec3) / @property({...}))归一成 options */
|
|
724
|
+
function normalizePropertyArgs(args) {
|
|
725
|
+
const options = {};
|
|
726
|
+
for (const arg of args) {
|
|
727
|
+
if (arg === undefined || arg === null)
|
|
728
|
+
continue;
|
|
729
|
+
if (Array.isArray(arg))
|
|
730
|
+
options.type = arg[0];
|
|
731
|
+
else if (typeof arg === "function")
|
|
732
|
+
options.type = arg;
|
|
733
|
+
else if (typeof arg === "object")
|
|
734
|
+
Object.assign(options, arg);
|
|
735
|
+
}
|
|
736
|
+
return options;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* 引擎的 _decorator。
|
|
740
|
+
* Node 下没有编辑器序列化,装饰器退化成"打标记 + 记类名":类名要记,
|
|
741
|
+
* 因为 js.getClassName / getClassByName 和日志都依赖它。
|
|
742
|
+
*/
|
|
743
|
+
exports._decorator = {
|
|
744
|
+
ccclass(nameOrTarget) {
|
|
745
|
+
return (target) => {
|
|
746
|
+
target.__isCCClass__ = true;
|
|
747
|
+
exports.js.setClassName(target, typeof nameOrTarget === "string" ? nameOrTarget : target.name);
|
|
748
|
+
exports.js.registerClass(target);
|
|
749
|
+
return target;
|
|
750
|
+
};
|
|
751
|
+
},
|
|
752
|
+
property(...args) {
|
|
753
|
+
const options = normalizePropertyArgs(args);
|
|
754
|
+
return (target, propertyKey) => {
|
|
755
|
+
if (propertyKey === undefined)
|
|
756
|
+
return;
|
|
757
|
+
const ctor = target.constructor;
|
|
758
|
+
if (!ctor.__properties__)
|
|
759
|
+
ctor.__properties__ = {};
|
|
760
|
+
ctor.__properties__[propertyKey] = options;
|
|
761
|
+
};
|
|
762
|
+
},
|
|
763
|
+
executeInEditMode: (target) => target,
|
|
764
|
+
requireComponent: (_type) => (target) => target,
|
|
765
|
+
executionOrder: (_order) => (target) => target,
|
|
766
|
+
disallowMultiple: (target) => target,
|
|
767
|
+
allowMultiple: (target) => target,
|
|
768
|
+
menu: (_path) => (target) => target,
|
|
769
|
+
help: (_url) => (target) => target,
|
|
770
|
+
// 属性级装饰器:Node 下不需要编辑器表现,统一原样返回
|
|
771
|
+
type: (_type) => (target, _key) => target,
|
|
772
|
+
integer: (target, _key) => target,
|
|
773
|
+
float: (target, _key) => target,
|
|
774
|
+
boolean: (target, _key) => target,
|
|
775
|
+
string: (target, _key) => target,
|
|
776
|
+
serializable: (target, _key) => target,
|
|
777
|
+
editable: (target, _key) => target,
|
|
778
|
+
override: (target, _key) => target,
|
|
779
|
+
visible: (target, _key) => target,
|
|
780
|
+
displayName: (_name) => (target, _key) => target,
|
|
781
|
+
tooltip: (_text) => (target, _key) => target,
|
|
782
|
+
range: (_min, _max, _step) => (target, _key) => target,
|
|
783
|
+
min: (_value) => (target, _key) => target,
|
|
784
|
+
max: (_value) => (target, _key) => target,
|
|
785
|
+
slide: (_value) => (target, _key) => target,
|
|
786
|
+
group: (_value) => (target, _key) => target,
|
|
787
|
+
notify: (_fn) => (target, _key) => target,
|
|
788
|
+
};
|
|
789
|
+
/* -------------------------------------------------------------------------- */
|
|
790
|
+
/* Component / Node */
|
|
791
|
+
/* -------------------------------------------------------------------------- */
|
|
792
|
+
/** 引擎的 Component 基类 */
|
|
793
|
+
class Component extends EventTarget {
|
|
794
|
+
node = null;
|
|
795
|
+
enabled = true;
|
|
796
|
+
get name() { return exports.js.getClassName(this.constructor); }
|
|
797
|
+
get isValid() { return this.node != null && this.node.isValid; }
|
|
798
|
+
getComponent(type) {
|
|
799
|
+
return this.node ? this.node.getComponent(type) : null;
|
|
800
|
+
}
|
|
801
|
+
/** Node 下没有引擎主循环,生命周期回调不会被自动调用 */
|
|
802
|
+
destroy() {
|
|
803
|
+
this.targetOff(this);
|
|
804
|
+
this.enabled = false;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
exports.Component = Component;
|
|
808
|
+
/**
|
|
809
|
+
* 引擎的 Node。
|
|
810
|
+
*
|
|
811
|
+
* 战斗逻辑只把它当"渲染层句柄"来回传(Game.getBattleHpLayer、技能回调的 node 参数),
|
|
812
|
+
* 所以这里给的是一棵真能挂能查的树 + 一套坐标,但不做任何渲染。
|
|
813
|
+
*
|
|
814
|
+
* 有意的取舍:不跑 onLoad/onEnable/update 这些生命周期——Node 下没有主循环去驱动它们,
|
|
815
|
+
* 与其假装调了,不如让它们根本不触发。
|
|
816
|
+
*/
|
|
817
|
+
class Node extends EventTarget {
|
|
818
|
+
_name;
|
|
819
|
+
_active = true;
|
|
820
|
+
_parent = null;
|
|
821
|
+
_children = [];
|
|
822
|
+
_components = [];
|
|
823
|
+
_destroyed = false;
|
|
824
|
+
position = new exports.math.Vec3();
|
|
825
|
+
scale = new exports.math.Vec3(1, 1, 1);
|
|
826
|
+
worldPosition = new exports.math.Vec3();
|
|
827
|
+
constructor(name = "Node") {
|
|
828
|
+
super();
|
|
829
|
+
this._name = name;
|
|
830
|
+
}
|
|
831
|
+
get name() { return this._name; }
|
|
832
|
+
set name(value) { this._name = value; }
|
|
833
|
+
get active() { return this._active; }
|
|
834
|
+
set active(value) { this._active = value; }
|
|
835
|
+
get activeInHierarchy() {
|
|
836
|
+
if (!this._active || this._destroyed)
|
|
837
|
+
return false;
|
|
838
|
+
return this._parent ? this._parent.activeInHierarchy : true;
|
|
839
|
+
}
|
|
840
|
+
get parent() { return this._parent; }
|
|
841
|
+
get children() { return this._children; }
|
|
842
|
+
get isValid() { return !this._destroyed; }
|
|
843
|
+
get isDestroyed() { return this._destroyed; }
|
|
844
|
+
addChild(child) {
|
|
845
|
+
if (!child || child === this)
|
|
846
|
+
return;
|
|
847
|
+
child.removeFromParent();
|
|
848
|
+
child._parent = this;
|
|
849
|
+
this._children.push(child);
|
|
850
|
+
}
|
|
851
|
+
removeChild(child) {
|
|
852
|
+
const index = this._children.indexOf(child);
|
|
853
|
+
if (index < 0)
|
|
854
|
+
return;
|
|
855
|
+
this._children.splice(index, 1);
|
|
856
|
+
child._parent = null;
|
|
857
|
+
}
|
|
858
|
+
removeFromParent() {
|
|
859
|
+
if (this._parent)
|
|
860
|
+
this._parent.removeChild(this);
|
|
861
|
+
}
|
|
862
|
+
removeAllChildren() {
|
|
863
|
+
for (const child of this._children.slice())
|
|
864
|
+
this.removeChild(child);
|
|
865
|
+
}
|
|
866
|
+
setParent(value) {
|
|
867
|
+
if (value)
|
|
868
|
+
value.addChild(this);
|
|
869
|
+
else
|
|
870
|
+
this.removeFromParent();
|
|
871
|
+
}
|
|
872
|
+
getChildByName(name) {
|
|
873
|
+
return this._children.find(child => child.name === name) || null;
|
|
874
|
+
}
|
|
875
|
+
isChildOf(parent) {
|
|
876
|
+
let node = this._parent;
|
|
877
|
+
while (node) {
|
|
878
|
+
if (node === parent)
|
|
879
|
+
return true;
|
|
880
|
+
node = node.parent;
|
|
881
|
+
}
|
|
882
|
+
return false;
|
|
883
|
+
}
|
|
884
|
+
addComponent(type) {
|
|
885
|
+
const component = new type();
|
|
886
|
+
component.node = this;
|
|
887
|
+
this._components.push(component);
|
|
888
|
+
return component;
|
|
889
|
+
}
|
|
890
|
+
getComponent(type) {
|
|
891
|
+
return this._components.find(c => this._matchComponent(c, type)) || null;
|
|
892
|
+
}
|
|
893
|
+
getComponents(type) {
|
|
894
|
+
return this._components.filter(c => this._matchComponent(c, type));
|
|
895
|
+
}
|
|
896
|
+
_matchComponent(component, type) {
|
|
897
|
+
if (typeof type === "string")
|
|
898
|
+
return exports.js.getClassName(component.constructor) === type;
|
|
899
|
+
return component instanceof type;
|
|
900
|
+
}
|
|
901
|
+
destroy() {
|
|
902
|
+
if (this._destroyed)
|
|
903
|
+
return;
|
|
904
|
+
this._destroyed = true;
|
|
905
|
+
this.removeAllChildren();
|
|
906
|
+
this.removeFromParent();
|
|
907
|
+
this.targetOff(this);
|
|
908
|
+
}
|
|
909
|
+
toString() { return `<Node ${this._name}>`; }
|
|
910
|
+
}
|
|
911
|
+
exports.Node = Node;
|
|
912
|
+
/* -------------------------------------------------------------------------- */
|
|
913
|
+
/* 渲染组件(占位) */
|
|
914
|
+
/* */
|
|
915
|
+
/* 只是让 Cfg.ts 里 `test?: Label` / `pro?: ProgressBar` 这类签名有类型,并且真 */
|
|
916
|
+
/* new 出来不会崩。它们不接任何渲染后端,属性怎么写都不会画到屏幕上。 */
|
|
917
|
+
/* -------------------------------------------------------------------------- */
|
|
918
|
+
class Label extends Component {
|
|
919
|
+
string = "";
|
|
920
|
+
fontSize = 40;
|
|
921
|
+
lineHeight = 40;
|
|
922
|
+
enableWrapText = true;
|
|
923
|
+
}
|
|
924
|
+
exports.Label = Label;
|
|
925
|
+
class ProgressBar extends Component {
|
|
926
|
+
/** 0 ~ 1 */
|
|
927
|
+
progress = 0;
|
|
928
|
+
totalLength = 100;
|
|
929
|
+
}
|
|
930
|
+
exports.ProgressBar = ProgressBar;
|
|
931
|
+
/* -------------------------------------------------------------------------- */
|
|
932
|
+
/* 资源 */
|
|
933
|
+
/* -------------------------------------------------------------------------- */
|
|
934
|
+
class Asset {
|
|
935
|
+
name = "";
|
|
936
|
+
_uuid = "";
|
|
937
|
+
nativeUrl = "";
|
|
938
|
+
refCount = 0;
|
|
939
|
+
_destroyed = false;
|
|
940
|
+
get isValid() { return !this._destroyed; }
|
|
941
|
+
addRef() {
|
|
942
|
+
this.refCount += 1;
|
|
943
|
+
return this;
|
|
944
|
+
}
|
|
945
|
+
decRef(_autoRelease) {
|
|
946
|
+
this.refCount -= 1;
|
|
947
|
+
return this;
|
|
948
|
+
}
|
|
949
|
+
destroy() {
|
|
950
|
+
if (this._destroyed)
|
|
951
|
+
return false;
|
|
952
|
+
this._destroyed = true;
|
|
953
|
+
return true;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
exports.Asset = Asset;
|
|
957
|
+
class JsonAsset extends Asset {
|
|
958
|
+
json = null;
|
|
959
|
+
}
|
|
960
|
+
exports.JsonAsset = JsonAsset;
|
|
961
|
+
class TextAsset extends Asset {
|
|
962
|
+
text = "";
|
|
963
|
+
}
|
|
964
|
+
exports.TextAsset = TextAsset;
|
|
965
|
+
/** 二进制资源。引擎里 _file 还可能是 Blob,Node 侧只会是 ArrayBuffer。 */
|
|
966
|
+
class BufferAsset extends Asset {
|
|
967
|
+
_file = null;
|
|
968
|
+
/** 引擎语义:返回二进制数据 */
|
|
969
|
+
buffer() {
|
|
970
|
+
return this._file;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
exports.BufferAsset = BufferAsset;
|
|
974
|
+
/**
|
|
975
|
+
* 资源包。
|
|
976
|
+
*
|
|
977
|
+
* Node 下没有 asset-db,所以默认是空的:调 load/loadDir 会带着明确的错误回调返回,
|
|
978
|
+
* 不会静默给 null——省得把"没配资源"和"资源是空对象"混在一起排查。
|
|
979
|
+
*
|
|
980
|
+
* 唯一的口子是 localRoot:指向一个磁盘目录后 load/loadDir 就按下面的约定读盘。
|
|
981
|
+
* 这是给后端跑战斗用的扩展,**不是 cc 的 API**:
|
|
982
|
+
* JsonAsset → <root>/<path>.json
|
|
983
|
+
* TextAsset → <root>/<path>.txt,读不到再试 <root>/<path>
|
|
984
|
+
* BufferAsset → <root>/<path>,按二进制读(Cfg 的 gzip 配置用)
|
|
985
|
+
* asset.name → 文件名去掉扩展名,和引擎里 element.name 的取值口径对齐
|
|
986
|
+
*/
|
|
987
|
+
class Bundle {
|
|
988
|
+
name;
|
|
989
|
+
/** 非 cc API:磁盘目录。设了它 load/loadDir 才真读得到东西 */
|
|
990
|
+
localRoot = null;
|
|
991
|
+
_cache = new Map();
|
|
992
|
+
constructor(name = "") {
|
|
993
|
+
this.name = name;
|
|
994
|
+
}
|
|
995
|
+
load(path, type, onProgress, onComplete) {
|
|
996
|
+
const cb = typeof onProgress === "function" ? onProgress : onComplete;
|
|
997
|
+
if (typeof cb !== "function") {
|
|
998
|
+
error(`Bundle("${this.name}").load("${path}"): 缺少回调`);
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
const cached = this._cache.get(path);
|
|
1002
|
+
if (cached) {
|
|
1003
|
+
cb(null, cached);
|
|
1004
|
+
return;
|
|
1005
|
+
}
|
|
1006
|
+
this._readOne(path, type).then(asset => cb(null, asset), (e) => cb(e, null));
|
|
1007
|
+
}
|
|
1008
|
+
loadDir(dir, type, onProgress, onComplete) {
|
|
1009
|
+
const cb = typeof onProgress === "function" ? onProgress : onComplete;
|
|
1010
|
+
if (typeof cb !== "function") {
|
|
1011
|
+
error(`Bundle("${this.name}").loadDir("${dir}"): 缺少回调`);
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
this._readDir(dir, type).then(assets => cb(null, assets), (e) => cb(e, null));
|
|
1015
|
+
}
|
|
1016
|
+
get(path, _type) {
|
|
1017
|
+
return this._cache.get(path) || null;
|
|
1018
|
+
}
|
|
1019
|
+
release(path) {
|
|
1020
|
+
const asset = this._cache.get(path);
|
|
1021
|
+
if (asset)
|
|
1022
|
+
asset.destroy();
|
|
1023
|
+
this._cache.delete(path);
|
|
1024
|
+
}
|
|
1025
|
+
releaseAll() {
|
|
1026
|
+
for (const asset of this._cache.values())
|
|
1027
|
+
asset.destroy();
|
|
1028
|
+
this._cache.clear();
|
|
1029
|
+
}
|
|
1030
|
+
async _readOne(path, type) {
|
|
1031
|
+
if (!this.localRoot)
|
|
1032
|
+
throw this._noSourceError("load", path);
|
|
1033
|
+
const fs = await Promise.resolve().then(() => __importStar(require("node:fs/promises")));
|
|
1034
|
+
const pathMod = await Promise.resolve().then(() => __importStar(require("node:path")));
|
|
1035
|
+
const base = pathMod.join(this.localRoot, path);
|
|
1036
|
+
// 用 any 比较:type 是泛型构造签名,和具体类之间 TS 认为没有重叠
|
|
1037
|
+
const ctor = type;
|
|
1038
|
+
const candidates = [];
|
|
1039
|
+
if (ctor === JsonAsset)
|
|
1040
|
+
candidates.push(`${base}.json`);
|
|
1041
|
+
else if (ctor === TextAsset)
|
|
1042
|
+
candidates.push(`${base}.txt`, base);
|
|
1043
|
+
else
|
|
1044
|
+
candidates.push(base);
|
|
1045
|
+
let lastError = null;
|
|
1046
|
+
for (const file of candidates) {
|
|
1047
|
+
try {
|
|
1048
|
+
const asset = new type();
|
|
1049
|
+
asset.name = pathMod.basename(file, pathMod.extname(file));
|
|
1050
|
+
asset._uuid = file;
|
|
1051
|
+
asset.nativeUrl = file;
|
|
1052
|
+
if (asset instanceof BufferAsset) {
|
|
1053
|
+
// 按原始字节读;Buffer 底层可能共享 Node 内存池,拷成独立 ArrayBuffer
|
|
1054
|
+
const bin = await fs.readFile(file);
|
|
1055
|
+
asset._file =
|
|
1056
|
+
bin.byteOffset === 0 && bin.byteLength === bin.buffer.byteLength
|
|
1057
|
+
? bin.buffer
|
|
1058
|
+
: bin.buffer.slice(bin.byteOffset, bin.byteOffset + bin.byteLength);
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
const raw = await fs.readFile(file, "utf8");
|
|
1062
|
+
if (asset instanceof JsonAsset)
|
|
1063
|
+
asset.json = JSON.parse(raw);
|
|
1064
|
+
else if (asset instanceof TextAsset)
|
|
1065
|
+
asset.text = raw;
|
|
1066
|
+
}
|
|
1067
|
+
this._cache.set(path, asset);
|
|
1068
|
+
return asset;
|
|
1069
|
+
}
|
|
1070
|
+
catch (e) {
|
|
1071
|
+
lastError = e;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
throw new Error(`[cc] Bundle("${this.name}") 读不到资源 "${path}",试过:${candidates.join(", ")}`
|
|
1075
|
+
+ `(最后一次错误:${lastError && lastError.message})`);
|
|
1076
|
+
}
|
|
1077
|
+
async _readDir(dir, type) {
|
|
1078
|
+
if (!this.localRoot)
|
|
1079
|
+
throw this._noSourceError("loadDir", dir);
|
|
1080
|
+
const fs = await Promise.resolve().then(() => __importStar(require("node:fs/promises")));
|
|
1081
|
+
const pathMod = await Promise.resolve().then(() => __importStar(require("node:path")));
|
|
1082
|
+
const ctor = type;
|
|
1083
|
+
const exts = ctor === JsonAsset ? [".json"] : (ctor === TextAsset ? [".txt"] : null);
|
|
1084
|
+
const entries = await fs.readdir(pathMod.join(this.localRoot, dir), { withFileTypes: true });
|
|
1085
|
+
const assets = [];
|
|
1086
|
+
for (const entry of entries) {
|
|
1087
|
+
if (!entry.isFile())
|
|
1088
|
+
continue;
|
|
1089
|
+
const ext = pathMod.extname(entry.name);
|
|
1090
|
+
if (exts && !exts.includes(ext))
|
|
1091
|
+
continue;
|
|
1092
|
+
const sub = pathMod.join(dir, entry.name.slice(0, entry.name.length - ext.length));
|
|
1093
|
+
assets.push(await this._readOne(sub, type));
|
|
1094
|
+
}
|
|
1095
|
+
return assets;
|
|
1096
|
+
}
|
|
1097
|
+
_noSourceError(method, path) {
|
|
1098
|
+
return new Error(`[cc] Bundle("${this.name}").${method}("${path}") 没有资源来源:`
|
|
1099
|
+
+ `Node 下没有 asset-db,需要先把 bundle.localRoot 指向磁盘目录`);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
exports.Bundle = Bundle;
|
|
1103
|
+
class AssetManager {
|
|
1104
|
+
_bundles = new Map();
|
|
1105
|
+
constructor() {
|
|
1106
|
+
// 引擎里内置的 resources 也是一个 bundle
|
|
1107
|
+
this._bundles.set("resources", new Bundle("resources"));
|
|
1108
|
+
}
|
|
1109
|
+
getBundle(name) {
|
|
1110
|
+
return this._bundles.get(name) || null;
|
|
1111
|
+
}
|
|
1112
|
+
loadBundle(name, onComplete) {
|
|
1113
|
+
const bundle = this.getBundle(name);
|
|
1114
|
+
if (bundle) {
|
|
1115
|
+
if (onComplete)
|
|
1116
|
+
onComplete(null, bundle);
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
const err = new Error(`[cc] 没有名为 "${name}" 的 bundle,先用 assetManager.addBundle 注册`);
|
|
1120
|
+
if (onComplete)
|
|
1121
|
+
onComplete(err, null);
|
|
1122
|
+
else
|
|
1123
|
+
error(err.message);
|
|
1124
|
+
}
|
|
1125
|
+
/** 非 cc API:把自建 bundle 挂进来,getBundle 才找得到 */
|
|
1126
|
+
addBundle(bundle) {
|
|
1127
|
+
this._bundles.set(bundle.name, bundle);
|
|
1128
|
+
return bundle;
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* 从 URL 加载。Node 18+ 有全局 fetch,直接用;
|
|
1132
|
+
* 小游戏/原生那套引擎下载器路径这里一概不走。
|
|
1133
|
+
*/
|
|
1134
|
+
loadRemote(url, type, onComplete) {
|
|
1135
|
+
const finish = (err, asset) => onComplete(err, asset);
|
|
1136
|
+
if (typeof fetch !== "function") {
|
|
1137
|
+
finish(new Error(`[cc] loadRemote 需要全局 fetch(Node 18+),当前运行时没有`), null);
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
fetch(url).then(
|
|
1141
|
+
// Response 的类型来自运行时(undici / 浏览器)的 ambient 声明,
|
|
1142
|
+
// 各版本对不上,这里按结构化用法处理,不依赖具体类型
|
|
1143
|
+
(response) => {
|
|
1144
|
+
if (!response.ok)
|
|
1145
|
+
throw new Error(`HTTP ${response.status}`);
|
|
1146
|
+
return response.text();
|
|
1147
|
+
}).then(text => {
|
|
1148
|
+
const asset = new type();
|
|
1149
|
+
asset.name = url.slice(url.lastIndexOf("/") + 1);
|
|
1150
|
+
asset.nativeUrl = url;
|
|
1151
|
+
if (asset instanceof JsonAsset)
|
|
1152
|
+
asset.json = JSON.parse(text);
|
|
1153
|
+
else if (asset instanceof TextAsset)
|
|
1154
|
+
asset.text = text;
|
|
1155
|
+
finish(null, asset);
|
|
1156
|
+
}, (e) => finish(e, null));
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
exports.assetManager = new AssetManager();
|
|
1160
|
+
/** 引擎内置的 resources bundle。Cfg.ts 从这里读 config/*.json */
|
|
1161
|
+
exports.resources = exports.assetManager.getBundle("resources");
|
|
1162
|
+
/* -------------------------------------------------------------------------- */
|
|
1163
|
+
/* 顶层桥接 */
|
|
1164
|
+
/* */
|
|
1165
|
+
/* 引擎的 cc 里 Vec2/Vec3 和 math.Vec2/math.Vec3 是同一份东西,那些数学工具函数 */
|
|
1166
|
+
/* 也同时挂在 cc 顶层。这里用 const + type 同名的写法桥过去,保证: */
|
|
1167
|
+
/* - cc.Vec3 === math.Vec3(同一个类对象,instanceof / 装饰器检查都安全) */
|
|
1168
|
+
/* - Vec3 既能当值用(new / instanceof),也能当类型用(let v: Vec3) */
|
|
1169
|
+
/* -------------------------------------------------------------------------- */
|
|
1170
|
+
exports.Vec2 = exports.math.Vec2;
|
|
1171
|
+
exports.Vec3 = exports.math.Vec3;
|
|
1172
|
+
exports.EPSILON = exports.math.EPSILON;
|
|
1173
|
+
exports.PI = exports.math.PI;
|
|
1174
|
+
exports.HALF_PI = exports.math.HALF_PI;
|
|
1175
|
+
exports.TWO_PI = exports.math.TWO_PI;
|
|
1176
|
+
exports.RAD = exports.math.RAD;
|
|
1177
|
+
exports.DEG = exports.math.DEG;
|
|
1178
|
+
exports.lerp = exports.math.lerp;
|
|
1179
|
+
exports.clamp = exports.math.clamp;
|
|
1180
|
+
exports.clamp01 = exports.math.clamp01;
|
|
1181
|
+
exports.toRadian = exports.math.toRadian;
|
|
1182
|
+
exports.toDegree = exports.math.toDegree;
|
|
1183
|
+
exports.randomRange = exports.math.randomRange;
|
|
1184
|
+
exports.randomRangeInt = exports.math.randomRangeInt;
|
|
1185
|
+
exports.sign = exports.math.sign;
|