| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | public class ConfigInitiator |
| | | { |
| | | static int minWorkingTask = 1; |
| | | static int maxWorkingTask = 10; |
| | | |
| | | static List<ConfigInitTask> priorTasks = new List<ConfigInitTask>(); |
| | | static List<ConfigInitTask> normalTasks = new List<ConfigInitTask>(); |
| | | |
| | | //初始加载的表 |
| | | public static List<string> builtinConfig = new List<string>() |
| | | { |
| | | "Contact.txt","HelpInfo.txt","PriorBundle.txt","PriorLanguage.txt","ApkUpdateUrl.txt","InitialFunction.txt" |
| | | }; |
| | | |
| | | public static void SyncInit() |
| | | { |
| | | ApkUpdateUrlConfig.Init(true); |
| | | PriorBundleConfig.Init(true); |
| | | PriorLanguageConfig.Init(true); |
| | | ContactConfig.Init(true); |
| | | HelpInfoConfig.Init(true); |
| | | InitialFunctionConfig.Init(true); |
| | | } |
| | | |
| | | public static bool IsLoginConfigInited |
| | | { |
| | | get |
| | | { |
| | | return IconConfig.inited |
| | | && LoginSeverListConfig.inited |
| | | && LanguageConfig.inited |
| | | && SysInfoConfig.inited |
| | | && AudioConfig.inited |
| | | && FuncConfigConfig.inited; |
| | | } |
| | | } |
| | | |
| | | public static bool IsCreateRoleConfigInited |
| | | { |
| | | get |
| | | { |
| | | return ItemConfig.inited |
| | | && DirtyWordConfig.inited |
| | | && CreateRoleConfig.inited |
| | | && JobSetupConfig.inited |
| | | && ModelResConfig.inited |
| | | && GodWeaponConfig.inited |
| | | && GodWeaponEffectConfig.inited |
| | | && EquipControlConfig.inited; |
| | | } |
| | | } |
| | | |
| | | static int priorTaskCount = 0; |
| | | static int taskCount = 0; |
| | | static int completeCount = 0; |
| | | public static bool done { get; private set; } |
| | | public static float progress { get; private set; } |
| | | |
| | | public static void Init() |
| | | { |
| | | PriorTasks(); |
| | | NormalTasks(); |
| | | minWorkingTask = GetMinWorkingTaskCount(); |
| | | maxWorkingTask = GetMaxWorkingTaskCount(); |
| | | |
| | | completeCount = 0; |
| | | priorTaskCount = priorTasks.Count; |
| | | taskCount = priorTasks.Count + normalTasks.Count; |
| | | var logicUpdate = new LogicUpdate(); |
| | | logicUpdate.Start( |
| | | () => |
| | | { |
| | | DistributeTask(); |
| | | progress = completeCount / (float)taskCount; |
| | | done = completeCount >= taskCount; |
| | | if (done) |
| | | { |
| | | logicUpdate.Destroy(); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | |
| | | private static void PriorTasks() |
| | | { |
| | | priorTasks.Add(new ConfigInitTask("FuncConfigConfig", () => { FuncConfigConfig.Init(); }, () => { return FuncConfigConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("LoginSeverListConfig", () => { LoginSeverListConfig.Init(); }, () => { return LoginSeverListConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("SysInfoConfig", () => { SysInfoConfig.Init(); }, () => { return SysInfoConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("IconConfig", () => { IconConfig.Init(); }, () => { return IconConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("LanguageConfig", () => { LanguageConfig.Init(); }, () => { return LanguageConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("AudioConfig", () => { AudioConfig.Init(); }, () => { return AudioConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("ItemConfig", () => { ItemConfig.Init(); }, () => { return ItemConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("DirtyWordConfig", () => { DirtyWordConfig.Init(); }, () => { return DirtyWordConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("CreateRoleConfig", () => { CreateRoleConfig.Init(); }, () => { return CreateRoleConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("EquipControlConfig", () => { EquipControlConfig.Init(); }, () => { return EquipControlConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("JobSetupConfig", () => { JobSetupConfig.Init(); }, () => { return JobSetupConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("ModelResConfig", () => { ModelResConfig.Init(); }, () => { return ModelResConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("GodWeaponConfig", () => { GodWeaponConfig.Init(); }, () => { return GodWeaponConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("GodWeaponEffectConfig", () => { GodWeaponEffectConfig.Init(); }, () => { return GodWeaponEffectConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("TASKINFOConfig", () => { TASKINFOConfig.Init(); }, () => { return TASKINFOConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("mapnpcConfig", () => { mapnpcConfig.Init(); }, () => { return mapnpcConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("SkillConfig", () => { SkillConfig.Init(); }, () => { return SkillConfig.inited; })); |
| | | } |
| | | |
| | | |
| | | private static void NormalTasks() |
| | | { |
| | | normalTasks.Add(new ConfigInitTask("SuperUpRechargeConfig", () => { SuperUpRechargeConfig.Init(); }, () => { return SuperUpRechargeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureConfig", () => { TreasureConfig.Init(); }, () => { return TreasureConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("UniquenessArriveConfig", () => { UniquenessArriveConfig.Init(); }, () => { return UniquenessArriveConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AllPeoplePartyConfig", () => { AllPeoplePartyConfig.Init(); }, () => { return AllPeoplePartyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AllPeoplePartyAwardConfig", () => { AllPeoplePartyAwardConfig.Init(); }, () => { return AllPeoplePartyAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonConfig", () => { DungeonConfig.Init(); }, () => { return DungeonConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EffectConfig", () => { EffectConfig.Init(); }, () => { return EffectConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AppointItemConfig", () => { AppointItemConfig.Init(); }, () => { return AppointItemConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("InSevenDaysConfig", () => { InSevenDaysConfig.Init(); }, () => { return InSevenDaysConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("InvestConfig", () => { InvestConfig.Init(); }, () => { return InvestConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ItemCompoundConfig", () => { ItemCompoundConfig.Init(); }, () => { return ItemCompoundConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ItemPlusConfig", () => { ItemPlusConfig.Init(); }, () => { return ItemPlusConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ItemPlusMaxConfig", () => { ItemPlusMaxConfig.Init(); }, () => { return ItemPlusMaxConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ItemPlusSumAttrConfig", () => { ItemPlusSumAttrConfig.Init(); }, () => { return ItemPlusSumAttrConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("JadeDynastyBossConfig", () => { JadeDynastyBossConfig.Init(); }, () => { return JadeDynastyBossConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("JadeDynastyStoneAttrConfig", () => { JadeDynastyStoneAttrConfig.Init(); }, () => { return JadeDynastyStoneAttrConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SkyTowerConfig", () => { SkyTowerConfig.Init(); }, () => { return SkyTowerConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SkyTowerServerChallengeConfig", () => { SkyTowerServerChallengeConfig.Init(); }, () => { return SkyTowerServerChallengeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("JobNameConfig", () => { JobNameConfig.Init(); }, () => { return JobNameConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("KickOutReasonConfig", () => { KickOutReasonConfig.Init(); }, () => { return KickOutReasonConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("KingTreasureConfig", () => { KingTreasureConfig.Init(); }, () => { return KingTreasureConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("KingTreasureItemConfig", () => { KingTreasureItemConfig.Init(); }, () => { return KingTreasureItemConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LoadingBackGroundConfig", () => { LoadingBackGroundConfig.Init(); }, () => { return LoadingBackGroundConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LoadingFunctionConfig", () => { LoadingFunctionConfig.Init(); }, () => { return LoadingFunctionConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LoadingTipConfig", () => { LoadingTipConfig.Init(); }, () => { return LoadingTipConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LoginAdConfig", () => { LoginAdConfig.Init(); }, () => { return LoginAdConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LoginRewardConfig", () => { LoginRewardConfig.Init(); }, () => { return LoginRewardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LVAawrdConfig", () => { LVAawrdConfig.Init(); }, () => { return LVAawrdConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("MailConfig", () => { MailConfig.Init(); }, () => { return MailConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("MapConfig", () => { MapConfig.Init(); }, () => { return MapConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("mapAreaConfig", () => { mapAreaConfig.Init(); }, () => { return mapAreaConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("mapbornConfig", () => { mapbornConfig.Init(); }, () => { return mapbornConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("MapEventPointConfig", () => { MapEventPointConfig.Init(); }, () => { return MapEventPointConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("MapResourcesConfig", () => { MapResourcesConfig.Init(); }, () => { return MapResourcesConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("maptransportConfig", () => { maptransportConfig.Init(); }, () => { return maptransportConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("MapUiControlConfig", () => { MapUiControlConfig.Init(); }, () => { return MapUiControlConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("MonsterNameColorConfig", () => { MonsterNameColorConfig.Init(); }, () => { return MonsterNameColorConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("MonsterRefreshPointConfig", () => { MonsterRefreshPointConfig.Init(); }, () => { return MonsterRefreshPointConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NewAllPeoplePartyConfig", () => { NewAllPeoplePartyConfig.Init(); }, () => { return NewAllPeoplePartyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NewAllPeoplePartyAwardConfig", () => { NewAllPeoplePartyAwardConfig.Init(); }, () => { return NewAllPeoplePartyAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NewUniquenessArriveConfig", () => { NewUniquenessArriveConfig.Init(); }, () => { return NewUniquenessArriveConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NPCConfig", () => { NPCConfig.Init(); }, () => { return NPCConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NPCDialogueConfig", () => { NPCDialogueConfig.Init(); }, () => { return NPCDialogueConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NPCDropItemConfig", () => { NPCDropItemConfig.Init(); }, () => { return NPCDropItemConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("OccupationNameConfig", () => { OccupationNameConfig.Init(); }, () => { return OccupationNameConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("OnlineAwardConfig", () => { OnlineAwardConfig.Init(); }, () => { return OnlineAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("OrderInfoConfig", () => { OrderInfoConfig.Init(); }, () => { return OrderInfoConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("OSCBillRankAwardConfig", () => { OSCBillRankAwardConfig.Init(); }, () => { return OSCBillRankAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("OSCBillTagAwardConfig", () => { OSCBillTagAwardConfig.Init(); }, () => { return OSCBillTagAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("OSRedAchieveConfig", () => { OSRedAchieveConfig.Init(); }, () => { return OSRedAchieveConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("PersonalBossConfig", () => { PersonalBossConfig.Init(); }, () => { return PersonalBossConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("PetClassCostConfig", () => { PetClassCostConfig.Init(); }, () => { return PetClassCostConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("PetEatEquipConfig", () => { PetEatEquipConfig.Init(); }, () => { return PetEatEquipConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("PetInfoConfig", () => { PetInfoConfig.Init(); }, () => { return PetInfoConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("PlayerLVConfig", () => { PlayerLVConfig.Init(); }, () => { return PlayerLVConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("PlayerPropertyConfig", () => { PlayerPropertyConfig.Init(); }, () => { return PlayerPropertyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("PyTaskConfig", () => { PyTaskConfig.Init(); }, () => { return PyTaskConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("QuestionBankConfig", () => { QuestionBankConfig.Init(); }, () => { return QuestionBankConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RandomNameConfig", () => { RandomNameConfig.Init(); }, () => { return RandomNameConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RankListConfig", () => { RankListConfig.Init(); }, () => { return RankListConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RealmConfig", () => { RealmConfig.Init(); }, () => { return RealmConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RealmPracticeConfig", () => { RealmPracticeConfig.Init(); }, () => { return RealmPracticeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RedPackConfig", () => { RedPackConfig.Init(); }, () => { return RedPackConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RefineStoveConfig", () => { RefineStoveConfig.Init(); }, () => { return RefineStoveConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ResourcesBackConfig", () => { ResourcesBackConfig.Init(); }, () => { return ResourcesBackConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RichTextMsgReplaceConfig", () => { RichTextMsgReplaceConfig.Init(); }, () => { return RichTextMsgReplaceConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RoleEquipStarsConfig", () => { RoleEquipStarsConfig.Init(); }, () => { return RoleEquipStarsConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RoleResourceConfig", () => { RoleResourceConfig.Init(); }, () => { return RoleResourceConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RoleStrongerConfig", () => { RoleStrongerConfig.Init(); }, () => { return RoleStrongerConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RuleConfig", () => { RuleConfig.Init(); }, () => { return RuleConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RuneConfig", () => { RuneConfig.Init(); }, () => { return RuneConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RuneComposeConfig", () => { RuneComposeConfig.Init(); }, () => { return RuneComposeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RuneTowerConfig", () => { RuneTowerConfig.Init(); }, () => { return RuneTowerConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RuneTowerFloorConfig", () => { RuneTowerFloorConfig.Init(); }, () => { return RuneTowerFloorConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SceneReplaceConfig", () => { SceneReplaceConfig.Init(); }, () => { return SceneReplaceConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SceneShadowConfig", () => { SceneShadowConfig.Init(); }, () => { return SceneShadowConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SignInConfig", () => { SignInConfig.Init(); }, () => { return SignInConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SkillFrameAnimationConfig", () => { SkillFrameAnimationConfig.Init(); }, () => { return SkillFrameAnimationConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("StoreConfig", () => { StoreConfig.Init(); }, () => { return StoreConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("StoryMissionsConfig", () => { StoryMissionsConfig.Init(); }, () => { return StoryMissionsConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SuccessConfig", () => { SuccessConfig.Init(); }, () => { return SuccessConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SuitEffectConfig", () => { SuitEffectConfig.Init(); }, () => { return SuitEffectConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TalentConfig", () => { TalentConfig.Init(); }, () => { return TalentConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TaskListConfig", () => { TaskListConfig.Init(); }, () => { return TaskListConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TaskPowerConfig", () => { TaskPowerConfig.Init(); }, () => { return TaskPowerConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TeamTargetConfig", () => { TeamTargetConfig.Init(); }, () => { return TeamTargetConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureDungeonConfig", () => { TreasureDungeonConfig.Init(); }, () => { return TreasureDungeonConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureFindHostConfig", () => { TreasureFindHostConfig.Init(); }, () => { return TreasureFindHostConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasurePrivilegeConfig", () => { TreasurePrivilegeConfig.Init(); }, () => { return TreasurePrivilegeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureSkillConfig", () => { TreasureSkillConfig.Init(); }, () => { return TreasureSkillConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureUpConfig", () => { TreasureUpConfig.Init(); }, () => { return TreasureUpConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TrialRewardsConfig", () => { TrialRewardsConfig.Init(); }, () => { return TrialRewardsConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("UnionLivenConfig", () => { UnionLivenConfig.Init(); }, () => { return UnionLivenConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ViewRoleFuncConfig", () => { ViewRoleFuncConfig.Init(); }, () => { return ViewRoleFuncConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("VIPAwardConfig", () => { VIPAwardConfig.Init(); }, () => { return VIPAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("VIPKillNPCConfig", () => { VIPKillNPCConfig.Init(); }, () => { return VIPKillNPCConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("VipPrivilegeConfig", () => { VipPrivilegeConfig.Init(); }, () => { return VipPrivilegeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WeatherConfig", () => { WeatherConfig.Init(); }, () => { return WeatherConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WeekPartyConfig", () => { WeekPartyConfig.Init(); }, () => { return WeekPartyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WeekPartyPointConfig", () => { WeekPartyPointConfig.Init(); }, () => { return WeekPartyPointConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WHYJRewardConfig", () => { WHYJRewardConfig.Init(); }, () => { return WHYJRewardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WindowSearchConfig", () => { WindowSearchConfig.Init(); }, () => { return WindowSearchConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WingRefineAttrConfig", () => { WingRefineAttrConfig.Init(); }, () => { return WingRefineAttrConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WingRefineExpConfig", () => { WingRefineExpConfig.Init(); }, () => { return WingRefineExpConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WorldBossConfig", () => { WorldBossConfig.Init(); }, () => { return WorldBossConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("XBGetItemConfig", () => { XBGetItemConfig.Init(); }, () => { return XBGetItemConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AlchemyConfig", () => { AlchemyConfig.Init(); }, () => { return AlchemyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AlchemySpecConfig", () => { AlchemySpecConfig.Init(); }, () => { return AlchemySpecConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AncientRobotNameConfig", () => { AncientRobotNameConfig.Init(); }, () => { return AncientRobotNameConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AreaCameraConfig", () => { AreaCameraConfig.Init(); }, () => { return AreaCameraConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AttrFruitConfig", () => { AttrFruitConfig.Init(); }, () => { return AttrFruitConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("BossHomeConfig", () => { BossHomeConfig.Init(); }, () => { return BossHomeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("BossInfoConfig", () => { BossInfoConfig.Init(); }, () => { return BossInfoConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("BossRebornConfig", () => { BossRebornConfig.Init(); }, () => { return BossRebornConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("bossSkillTipsConfig", () => { bossSkillTipsConfig.Init(); }, () => { return bossSkillTipsConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ChatBubbleBoxConfig", () => { ChatBubbleBoxConfig.Init(); }, () => { return ChatBubbleBoxConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ChestsConfig", () => { ChestsConfig.Init(); }, () => { return ChestsConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ChestsAwardConfig", () => { ChestsAwardConfig.Init(); }, () => { return ChestsAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ContinueSignInConfig", () => { ContinueSignInConfig.Init(); }, () => { return ContinueSignInConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossServerArenaConfig", () => { CrossServerArenaConfig.Init(); }, () => { return CrossServerArenaConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossServerBossConfig", () => { CrossServerBossConfig.Init(); }, () => { return CrossServerBossConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CTGConfig", () => { CTGConfig.Init(); }, () => { return CTGConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DailyLivenessRewardConfig", () => { DailyLivenessRewardConfig.Init(); }, () => { return DailyLivenessRewardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DailyQuestConfig", () => { DailyQuestConfig.Init(); }, () => { return DailyQuestConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DailyQuestOpenTimeConfig", () => { DailyQuestOpenTimeConfig.Init(); }, () => { return DailyQuestOpenTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DailyQuestSpecialOpenTimeConfig", () => { DailyQuestSpecialOpenTimeConfig.Init(); }, () => { return DailyQuestSpecialOpenTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DamageNumConfig", () => { DamageNumConfig.Init(); }, () => { return DamageNumConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ActorShowConfig", () => { ActorShowConfig.Init(); }, () => { return ActorShowConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DemonJarConfig", () => { DemonJarConfig.Init(); }, () => { return DemonJarConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DemonRecommondPropertyConfig", () => { DemonRecommondPropertyConfig.Init(); }, () => { return DemonRecommondPropertyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DialogConfig", () => { DialogConfig.Init(); }, () => { return DialogConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DienstgradConfig", () => { DienstgradConfig.Init(); }, () => { return DienstgradConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DirtyNameConfig", () => { DirtyNameConfig.Init(); }, () => { return DirtyNameConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DogzConfig", () => { DogzConfig.Init(); }, () => { return DogzConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DogzEquipPlusConfig", () => { DogzEquipPlusConfig.Init(); }, () => { return DogzEquipPlusConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonHelpBattleConfig", () => { DungeonHelpBattleConfig.Init(); }, () => { return DungeonHelpBattleConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonHintConfig", () => { DungeonHintConfig.Init(); }, () => { return DungeonHintConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonInspireConfig", () => { DungeonInspireConfig.Init(); }, () => { return DungeonInspireConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonOpenTimeConfig", () => { DungeonOpenTimeConfig.Init(); }, () => { return DungeonOpenTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonSpecialStateTimeConfig", () => { DungeonSpecialStateTimeConfig.Init(); }, () => { return DungeonSpecialStateTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonStateTimeConfig", () => { DungeonStateTimeConfig.Init(); }, () => { return DungeonStateTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ElderGodAreaConfig", () => { ElderGodAreaConfig.Init(); }, () => { return ElderGodAreaConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipDeComposeConfig", () => { EquipDeComposeConfig.Init(); }, () => { return EquipDeComposeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipGSParamConfig", () => { EquipGSParamConfig.Init(); }, () => { return EquipGSParamConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitAttrConfig", () => { EquipSuitAttrConfig.Init(); }, () => { return EquipSuitAttrConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipWashConfig", () => { EquipWashConfig.Init(); }, () => { return EquipWashConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FaceConfig", () => { FaceConfig.Init(); }, () => { return FaceConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FamilyConfig", () => { FamilyConfig.Init(); }, () => { return FamilyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FamilyTechConfig", () => { FamilyTechConfig.Init(); }, () => { return FamilyTechConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FashionDressConfig", () => { FashionDressConfig.Init(); }, () => { return FashionDressConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FashionDressCabinetConfig", () => { FashionDressCabinetConfig.Init(); }, () => { return FashionDressCabinetConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FestivalRedpackTaskConfig", () => { FestivalRedpackTaskConfig.Init(); }, () => { return FestivalRedpackTaskConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FightPowerParamConfig", () => { FightPowerParamConfig.Init(); }, () => { return FightPowerParamConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FuncOpenLVConfig", () => { FuncOpenLVConfig.Init(); }, () => { return FuncOpenLVConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FuncSwitchConfig", () => { FuncSwitchConfig.Init(); }, () => { return FuncSwitchConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FunctionForecastConfig", () => { FunctionForecastConfig.Init(); }, () => { return FunctionForecastConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("GatherSoulConfig", () => { GatherSoulConfig.Init(); }, () => { return GatherSoulConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("GatherSoulComposeConfig", () => { GatherSoulComposeConfig.Init(); }, () => { return GatherSoulComposeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("GatherSoulPropertyConfig", () => { GatherSoulPropertyConfig.Init(); }, () => { return GatherSoulPropertyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("GetItemWaysConfig", () => { GetItemWaysConfig.Init(); }, () => { return GetItemWaysConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("GmCmdConfig", () => { GmCmdConfig.Init(); }, () => { return GmCmdConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("GuardConfig", () => { GuardConfig.Init(); }, () => { return GuardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("GuideConfig", () => { GuideConfig.Init(); }, () => { return GuideConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("HolidayHomingConfig", () => { HolidayHomingConfig.Init(); }, () => { return HolidayHomingConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("HolidayHomingPointConfig", () => { HolidayHomingPointConfig.Init(); }, () => { return HolidayHomingPointConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("HorseConfig", () => { HorseConfig.Init(); }, () => { return HorseConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("HorseUpConfig", () => { HorseUpConfig.Init(); }, () => { return HorseUpConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("IceLodeStarAwardConfig", () => { IceLodeStarAwardConfig.Init(); }, () => { return IceLodeStarAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("XMZZAchievementConfig", () => { XMZZAchievementConfig.Init(); }, () => { return XMZZAchievementConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossRealmPKOrderAwardConfig", () => { CrossRealmPKOrderAwardConfig.Init(); }, () => { return CrossRealmPKOrderAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonMixServerStateTimeConfig", () => { DungeonMixServerStateTimeConfig.Init(); }, () => { return DungeonMixServerStateTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DailyQuestMixServerStateTimeConfig", () => { DailyQuestMixServerStateTimeConfig.Init(); }, () => { return DailyQuestMixServerStateTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossRealmPKDanAwardConfig", () => { CrossRealmPKDanAwardConfig.Init(); }, () => { return CrossRealmPKDanAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossServerOneVsOneRobotConfig", () => { CrossServerOneVsOneRobotConfig.Init(); }, () => { return CrossServerOneVsOneRobotConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ArenaRobotConfig", () => { ArenaRobotConfig.Init(); }, () => { return ArenaRobotConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ArenaRobotLVConfig", () => { ArenaRobotLVConfig.Init(); }, () => { return ArenaRobotLVConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AuctionConfig", () => { AuctionConfig.Init(); }, () => { return AuctionConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AuctionItemConfig", () => { AuctionItemConfig.Init(); }, () => { return AuctionItemConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AuctionIndexConfig", () => { AuctionIndexConfig.Init(); }, () => { return AuctionIndexConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipPlaceMapConfig", () => { EquipPlaceMapConfig.Init(); }, () => { return EquipPlaceMapConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitConfig", () => { EquipSuitConfig.Init(); }, () => { return EquipSuitConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipStarConfig", () => { EquipStarConfig.Init(); }, () => { return EquipStarConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WashLevelMaxConfig", () => { WashLevelMaxConfig.Init(); }, () => { return WashLevelMaxConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipPlusEvolveConfig", () => { EquipPlusEvolveConfig.Init(); }, () => { return EquipPlusEvolveConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyValueConfig", () => { LegendPropertyValueConfig.Init(); }, () => { return LegendPropertyValueConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyConfig", () => { LegendPropertyConfig.Init(); }, () => { return LegendPropertyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitNameConfig", () => { EquipSuitNameConfig.Init(); }, () => { return EquipSuitNameConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ReikiRootConfig", () => { ReikiRootConfig.Init(); }, () => { return ReikiRootConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("HazyRegionConfig", () => { HazyRegionConfig.Init(); }, () => { return HazyRegionConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AdventureDialogueConfig", () => { AdventureDialogueConfig.Init(); }, () => { return AdventureDialogueConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonUseBuffConfig", () => { DungeonUseBuffConfig.Init(); }, () => { return DungeonUseBuffConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AlchemyCountConfig", () => { AlchemyCountConfig.Init(); }, () => { return AlchemyCountConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CollectNpcConfig", () => { CollectNpcConfig.Init(); }, () => { return CollectNpcConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureChapterConfig", () => { TreasureChapterConfig.Init(); }, () => { return TreasureChapterConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TaskFeedbackConfig", () => { TaskFeedbackConfig.Init(); }, () => { return TaskFeedbackConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TaskFeedbackFuncConfig", () => { TaskFeedbackFuncConfig.Init(); }, () => { return TaskFeedbackFuncConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("VipPrivilegeInfoConfig", () => { VipPrivilegeInfoConfig.Init(); }, () => { return VipPrivilegeInfoConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FairyLeagueRankAwardConfig", () => { FairyLeagueRankAwardConfig.Init(); }, () => { return FairyLeagueRankAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("SpiritWeaponConfig", () => { SpiritWeaponConfig.Init(); }, () => { return SpiritWeaponConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NewDropItemGroupConfig", () => { NewDropItemGroupConfig.Init(); }, () => { return NewDropItemGroupConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("OpenServerActivityConfig", () => { OpenServerActivityConfig.Init(); }, () => { return OpenServerActivityConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("RidingPetBossRewardConfig", () => { RidingPetBossRewardConfig.Init(); }, () => { return RidingPetBossRewardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ReikiRootEffectConfig", () => { ReikiRootEffectConfig.Init(); }, () => { return ReikiRootEffectConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ItemExchangeConfig", () => { ItemExchangeConfig.Init(); }, () => { return ItemExchangeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AddUpRechargeConfig", () => { AddUpRechargeConfig.Init(); }, () => { return AddUpRechargeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("BOSSFirstKillConfig", () => { BOSSFirstKillConfig.Init(); }, () => { return BOSSFirstKillConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipShenAttrConfig", () => { EquipShenAttrConfig.Init(); }, () => { return EquipShenAttrConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ItemPlusMasterConfig", () => { ItemPlusMasterConfig.Init(); }, () => { return ItemPlusMasterConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AssistThanksGiftConfig", () => { AssistThanksGiftConfig.Init(); }, () => { return AssistThanksGiftConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("HorseLVUpConfig", () => { HorseLVUpConfig.Init(); }, () => { return HorseLVUpConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("HorseSkinPlusConfig", () => { HorseSkinPlusConfig.Init(); }, () => { return HorseSkinPlusConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("FirstGoldConfig", () => { FirstGoldConfig.Init(); }, () => { return FirstGoldConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ActFeastTravelTaskConfig", () => { ActFeastTravelTaskConfig.Init(); }, () => { return ActFeastTravelTaskConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("NPCExConfig", () => { NPCExConfig.Init(); }, () => { return NPCExConfig.inited; })); |
| | | |
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |
| | | private static void DistributeTask() |
| | | { |
| | | for (var i = doingTasks.Count - 1; i >= 0; i--) |
| | | { |
| | | var task = doingTasks[i]; |
| | | if (task.Completed()) |
| | | { |
| | | PostProcess(task.taskName); |
| | | completeCount++; |
| | | doingTasks.RemoveAt(i); |
| | | } |
| | | } |
| | | |
| | | var workingTaskLimit = completeCount >= priorTaskCount ? maxWorkingTask : minWorkingTask; |
| | | while (doingTasks.Count < workingTaskLimit && (priorTasks.Count > 0 || normalTasks.Count > 0)) |
| | | { |
| | | ConfigInitTask task = null; |
| | | if (priorTasks.Count > 0) |
| | | { |
| | | task = priorTasks[0]; |
| | | priorTasks.RemoveAt(0); |
| | | } |
| | | else |
| | | { |
| | | task = normalTasks[0]; |
| | | normalTasks.RemoveAt(0); |
| | | } |
| | | |
| | | doingTasks.Add(task); |
| | | task.Start(); |
| | | } |
| | | } |
| | | |
| | | private static void PostProcess(string configName) |
| | | { |
| | | switch (configName) |
| | | { |
| | | case "ItemConfig": |
| | | ItemConfig.GemItemInit(); |
| | | break; |
| | | case "SkillConfig": |
| | | SkillConfig.SkillClassifingInit(); |
| | | break; |
| | | case "FuncConfigConfig": |
| | | GeneralDefine.Init(); |
| | | break; |
| | | case "DirtyWordConfig": |
| | | DirtyWordConfig.DirtyWordInit(); |
| | | break; |
| | | case "DirtyNameConfig": |
| | | DirtyNameConfig.DirtyNameInit(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | static int GetMinWorkingTaskCount() |
| | | { |
| | | switch (Application.platform) |
| | | { |
| | | case RuntimePlatform.Android: |
| | | if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.2f * 1024) |
| | | { |
| | | return 4; |
| | | } |
| | | else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024) |
| | | { |
| | | return 2; |
| | | } |
| | | else |
| | | { |
| | | return 1; |
| | | } |
| | | case RuntimePlatform.IPhonePlayer: |
| | | if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024) |
| | | { |
| | | return 4; |
| | | } |
| | | else |
| | | { |
| | | return 1; |
| | | } |
| | | case RuntimePlatform.OSXEditor: |
| | | case RuntimePlatform.WindowsEditor: |
| | | return 5; |
| | | default: |
| | | return 1; |
| | | } |
| | | } |
| | | |
| | | static int GetMaxWorkingTaskCount() |
| | | { |
| | | switch (Application.platform) |
| | | { |
| | | case RuntimePlatform.Android: |
| | | if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.2f * 1024) |
| | | { |
| | | return 20; |
| | | } |
| | | else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024) |
| | | { |
| | | return 5; |
| | | } |
| | | else if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024) |
| | | { |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | return 1; |
| | | } |
| | | case RuntimePlatform.IPhonePlayer: |
| | | if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024) |
| | | { |
| | | return 5; |
| | | } |
| | | else |
| | | { |
| | | return 1; |
| | | } |
| | | case RuntimePlatform.OSXEditor: |
| | | case RuntimePlatform.WindowsEditor: |
| | | return 20; |
| | | default: |
| | | return 5; |
| | | } |
| | | } |
| | | |
| | | public delegate bool ConfigInitResult(); |
| | | public class ConfigInitTask |
| | | { |
| | | public string taskName; |
| | | Action task; |
| | | ConfigInitResult result; |
| | | |
| | | public ConfigInitTask(string taskName, Action task, ConfigInitResult result) |
| | | { |
| | | this.taskName = taskName; |
| | | this.task = task; |
| | | this.result = result; |
| | | } |
| | | |
| | | public void Start() |
| | | { |
| | | task(); |
| | | } |
| | | |
| | | public bool Completed() |
| | | { |
| | | return result(); |
| | | } |
| | | |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | public static void EditorLoad() |
| | | { |
| | | NPCConfig.Init(true); |
| | | ModelResConfig.Init(true); |
| | | IconConfig.Init(true); |
| | | SysInfoConfig.Init(true); |
| | | LanguageConfig.Init(true); |
| | | RealmConfig.Init(true); |
| | | ActorShowConfig.Init(true); |
| | | } |
| | | #endif |
| | | } |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | public class ConfigInitiator
|
| | | {
|
| | | static int minWorkingTask = 1;
|
| | | static int maxWorkingTask = 10;
|
| | |
|
| | | static List<ConfigInitTask> priorTasks = new List<ConfigInitTask>();
|
| | | static List<ConfigInitTask> normalTasks = new List<ConfigInitTask>();
|
| | |
|
| | | //初始加载的表
|
| | | public static List<string> builtinConfig = new List<string>()
|
| | | {
|
| | | "Contact.txt","HelpInfo.txt","PriorBundle.txt","PriorLanguage.txt","ApkUpdateUrl.txt","InitialFunction.txt"
|
| | | };
|
| | |
|
| | | public static void SyncInit()
|
| | | {
|
| | | ApkUpdateUrlConfig.Init(true);
|
| | | PriorBundleConfig.Init(true);
|
| | | PriorLanguageConfig.Init(true);
|
| | | ContactConfig.Init(true);
|
| | | HelpInfoConfig.Init(true);
|
| | | InitialFunctionConfig.Init(true);
|
| | | }
|
| | |
|
| | | public static bool IsLoginConfigInited
|
| | | {
|
| | | get
|
| | | {
|
| | | return IconConfig.inited
|
| | | && LoginSeverListConfig.inited
|
| | | && LanguageConfig.inited
|
| | | && SysInfoConfig.inited
|
| | | && AudioConfig.inited
|
| | | && FuncConfigConfig.inited;
|
| | | }
|
| | | }
|
| | |
|
| | | public static bool IsCreateRoleConfigInited
|
| | | {
|
| | | get
|
| | | {
|
| | | return ItemConfig.inited
|
| | | && DirtyWordConfig.inited
|
| | | && CreateRoleConfig.inited
|
| | | && JobSetupConfig.inited
|
| | | && ModelResConfig.inited
|
| | | && GodWeaponConfig.inited
|
| | | && GodWeaponEffectConfig.inited
|
| | | && EquipControlConfig.inited;
|
| | | }
|
| | | }
|
| | |
|
| | | static int priorTaskCount = 0;
|
| | | static int taskCount = 0;
|
| | | static int completeCount = 0;
|
| | | public static bool done { get; private set; }
|
| | | public static float progress { get; private set; }
|
| | |
|
| | | public static void Init()
|
| | | {
|
| | | PriorTasks();
|
| | | NormalTasks();
|
| | | minWorkingTask = GetMinWorkingTaskCount();
|
| | | maxWorkingTask = GetMaxWorkingTaskCount();
|
| | |
|
| | | completeCount = 0;
|
| | | priorTaskCount = priorTasks.Count;
|
| | | taskCount = priorTasks.Count + normalTasks.Count;
|
| | | var logicUpdate = new LogicUpdate();
|
| | | logicUpdate.Start(
|
| | | () =>
|
| | | {
|
| | | DistributeTask();
|
| | | progress = completeCount / (float)taskCount;
|
| | | done = completeCount >= taskCount;
|
| | | if (done)
|
| | | {
|
| | | logicUpdate.Destroy();
|
| | | }
|
| | | }
|
| | | );
|
| | | }
|
| | |
|
| | | private static void PriorTasks()
|
| | | {
|
| | | priorTasks.Add(new ConfigInitTask("FuncConfigConfig", () => { FuncConfigConfig.Init(); }, () => { return FuncConfigConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("LoginSeverListConfig", () => { LoginSeverListConfig.Init(); }, () => { return LoginSeverListConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("SysInfoConfig", () => { SysInfoConfig.Init(); }, () => { return SysInfoConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("IconConfig", () => { IconConfig.Init(); }, () => { return IconConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("LanguageConfig", () => { LanguageConfig.Init(); }, () => { return LanguageConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("AudioConfig", () => { AudioConfig.Init(); }, () => { return AudioConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("ItemConfig", () => { ItemConfig.Init(); }, () => { return ItemConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("DirtyWordConfig", () => { DirtyWordConfig.Init(); }, () => { return DirtyWordConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("CreateRoleConfig", () => { CreateRoleConfig.Init(); }, () => { return CreateRoleConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("EquipControlConfig", () => { EquipControlConfig.Init(); }, () => { return EquipControlConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("JobSetupConfig", () => { JobSetupConfig.Init(); }, () => { return JobSetupConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("ModelResConfig", () => { ModelResConfig.Init(); }, () => { return ModelResConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("GodWeaponConfig", () => { GodWeaponConfig.Init(); }, () => { return GodWeaponConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("GodWeaponEffectConfig", () => { GodWeaponEffectConfig.Init(); }, () => { return GodWeaponEffectConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("TASKINFOConfig", () => { TASKINFOConfig.Init(); }, () => { return TASKINFOConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("mapnpcConfig", () => { mapnpcConfig.Init(); }, () => { return mapnpcConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("SkillConfig", () => { SkillConfig.Init(); }, () => { return SkillConfig.inited; }));
|
| | | }
|
| | |
|
| | | |
| | | private static void NormalTasks()
|
| | | {
|
| | | normalTasks.Add(new ConfigInitTask("SuperUpRechargeConfig", () => { SuperUpRechargeConfig.Init(); }, () => { return SuperUpRechargeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasureConfig", () => { TreasureConfig.Init(); }, () => { return TreasureConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("UniquenessArriveConfig", () => { UniquenessArriveConfig.Init(); }, () => { return UniquenessArriveConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AllPeoplePartyConfig", () => { AllPeoplePartyConfig.Init(); }, () => { return AllPeoplePartyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AllPeoplePartyAwardConfig", () => { AllPeoplePartyAwardConfig.Init(); }, () => { return AllPeoplePartyAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonConfig", () => { DungeonConfig.Init(); }, () => { return DungeonConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EffectConfig", () => { EffectConfig.Init(); }, () => { return EffectConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AppointItemConfig", () => { AppointItemConfig.Init(); }, () => { return AppointItemConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("InSevenDaysConfig", () => { InSevenDaysConfig.Init(); }, () => { return InSevenDaysConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("InvestConfig", () => { InvestConfig.Init(); }, () => { return InvestConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ItemCompoundConfig", () => { ItemCompoundConfig.Init(); }, () => { return ItemCompoundConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ItemPlusConfig", () => { ItemPlusConfig.Init(); }, () => { return ItemPlusConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ItemPlusMaxConfig", () => { ItemPlusMaxConfig.Init(); }, () => { return ItemPlusMaxConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ItemPlusSumAttrConfig", () => { ItemPlusSumAttrConfig.Init(); }, () => { return ItemPlusSumAttrConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("JadeDynastyBossConfig", () => { JadeDynastyBossConfig.Init(); }, () => { return JadeDynastyBossConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("JadeDynastyStoneAttrConfig", () => { JadeDynastyStoneAttrConfig.Init(); }, () => { return JadeDynastyStoneAttrConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SkyTowerConfig", () => { SkyTowerConfig.Init(); }, () => { return SkyTowerConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SkyTowerServerChallengeConfig", () => { SkyTowerServerChallengeConfig.Init(); }, () => { return SkyTowerServerChallengeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("JobNameConfig", () => { JobNameConfig.Init(); }, () => { return JobNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("KickOutReasonConfig", () => { KickOutReasonConfig.Init(); }, () => { return KickOutReasonConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("KingTreasureConfig", () => { KingTreasureConfig.Init(); }, () => { return KingTreasureConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("KingTreasureItemConfig", () => { KingTreasureItemConfig.Init(); }, () => { return KingTreasureItemConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LoadingBackGroundConfig", () => { LoadingBackGroundConfig.Init(); }, () => { return LoadingBackGroundConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LoadingFunctionConfig", () => { LoadingFunctionConfig.Init(); }, () => { return LoadingFunctionConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LoadingTipConfig", () => { LoadingTipConfig.Init(); }, () => { return LoadingTipConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LoginAdConfig", () => { LoginAdConfig.Init(); }, () => { return LoginAdConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LoginRewardConfig", () => { LoginRewardConfig.Init(); }, () => { return LoginRewardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LVAawrdConfig", () => { LVAawrdConfig.Init(); }, () => { return LVAawrdConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("MailConfig", () => { MailConfig.Init(); }, () => { return MailConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("MapConfig", () => { MapConfig.Init(); }, () => { return MapConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("mapAreaConfig", () => { mapAreaConfig.Init(); }, () => { return mapAreaConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("mapbornConfig", () => { mapbornConfig.Init(); }, () => { return mapbornConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("MapEventPointConfig", () => { MapEventPointConfig.Init(); }, () => { return MapEventPointConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("MapResourcesConfig", () => { MapResourcesConfig.Init(); }, () => { return MapResourcesConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("maptransportConfig", () => { maptransportConfig.Init(); }, () => { return maptransportConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("MapUiControlConfig", () => { MapUiControlConfig.Init(); }, () => { return MapUiControlConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("MonsterNameColorConfig", () => { MonsterNameColorConfig.Init(); }, () => { return MonsterNameColorConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("MonsterRefreshPointConfig", () => { MonsterRefreshPointConfig.Init(); }, () => { return MonsterRefreshPointConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NewAllPeoplePartyConfig", () => { NewAllPeoplePartyConfig.Init(); }, () => { return NewAllPeoplePartyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NewAllPeoplePartyAwardConfig", () => { NewAllPeoplePartyAwardConfig.Init(); }, () => { return NewAllPeoplePartyAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NewUniquenessArriveConfig", () => { NewUniquenessArriveConfig.Init(); }, () => { return NewUniquenessArriveConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NPCConfig", () => { NPCConfig.Init(); }, () => { return NPCConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NPCDialogueConfig", () => { NPCDialogueConfig.Init(); }, () => { return NPCDialogueConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NPCDropItemConfig", () => { NPCDropItemConfig.Init(); }, () => { return NPCDropItemConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("OccupationNameConfig", () => { OccupationNameConfig.Init(); }, () => { return OccupationNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("OnlineAwardConfig", () => { OnlineAwardConfig.Init(); }, () => { return OnlineAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("OrderInfoConfig", () => { OrderInfoConfig.Init(); }, () => { return OrderInfoConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("OSCBillRankAwardConfig", () => { OSCBillRankAwardConfig.Init(); }, () => { return OSCBillRankAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("OSCBillTagAwardConfig", () => { OSCBillTagAwardConfig.Init(); }, () => { return OSCBillTagAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("OSRedAchieveConfig", () => { OSRedAchieveConfig.Init(); }, () => { return OSRedAchieveConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("PersonalBossConfig", () => { PersonalBossConfig.Init(); }, () => { return PersonalBossConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("PetClassCostConfig", () => { PetClassCostConfig.Init(); }, () => { return PetClassCostConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("PetEatEquipConfig", () => { PetEatEquipConfig.Init(); }, () => { return PetEatEquipConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("PetInfoConfig", () => { PetInfoConfig.Init(); }, () => { return PetInfoConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("PlayerLVConfig", () => { PlayerLVConfig.Init(); }, () => { return PlayerLVConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("PlayerPropertyConfig", () => { PlayerPropertyConfig.Init(); }, () => { return PlayerPropertyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("PyTaskConfig", () => { PyTaskConfig.Init(); }, () => { return PyTaskConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("QuestionBankConfig", () => { QuestionBankConfig.Init(); }, () => { return QuestionBankConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RandomNameConfig", () => { RandomNameConfig.Init(); }, () => { return RandomNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RankListConfig", () => { RankListConfig.Init(); }, () => { return RankListConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RealmConfig", () => { RealmConfig.Init(); }, () => { return RealmConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RealmPracticeConfig", () => { RealmPracticeConfig.Init(); }, () => { return RealmPracticeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RedPackConfig", () => { RedPackConfig.Init(); }, () => { return RedPackConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RefineStoveConfig", () => { RefineStoveConfig.Init(); }, () => { return RefineStoveConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ResourcesBackConfig", () => { ResourcesBackConfig.Init(); }, () => { return ResourcesBackConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RichTextMsgReplaceConfig", () => { RichTextMsgReplaceConfig.Init(); }, () => { return RichTextMsgReplaceConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RoleEquipStarsConfig", () => { RoleEquipStarsConfig.Init(); }, () => { return RoleEquipStarsConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RoleResourceConfig", () => { RoleResourceConfig.Init(); }, () => { return RoleResourceConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RoleStrongerConfig", () => { RoleStrongerConfig.Init(); }, () => { return RoleStrongerConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RuleConfig", () => { RuleConfig.Init(); }, () => { return RuleConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RuneConfig", () => { RuneConfig.Init(); }, () => { return RuneConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RuneComposeConfig", () => { RuneComposeConfig.Init(); }, () => { return RuneComposeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RuneTowerConfig", () => { RuneTowerConfig.Init(); }, () => { return RuneTowerConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RuneTowerFloorConfig", () => { RuneTowerFloorConfig.Init(); }, () => { return RuneTowerFloorConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SceneReplaceConfig", () => { SceneReplaceConfig.Init(); }, () => { return SceneReplaceConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SceneShadowConfig", () => { SceneShadowConfig.Init(); }, () => { return SceneShadowConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SignInConfig", () => { SignInConfig.Init(); }, () => { return SignInConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SkillFrameAnimationConfig", () => { SkillFrameAnimationConfig.Init(); }, () => { return SkillFrameAnimationConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("StoreConfig", () => { StoreConfig.Init(); }, () => { return StoreConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("StoryMissionsConfig", () => { StoryMissionsConfig.Init(); }, () => { return StoryMissionsConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SuccessConfig", () => { SuccessConfig.Init(); }, () => { return SuccessConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SuitEffectConfig", () => { SuitEffectConfig.Init(); }, () => { return SuitEffectConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TalentConfig", () => { TalentConfig.Init(); }, () => { return TalentConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TaskListConfig", () => { TaskListConfig.Init(); }, () => { return TaskListConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TaskPowerConfig", () => { TaskPowerConfig.Init(); }, () => { return TaskPowerConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TeamTargetConfig", () => { TeamTargetConfig.Init(); }, () => { return TeamTargetConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasureDungeonConfig", () => { TreasureDungeonConfig.Init(); }, () => { return TreasureDungeonConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasureFindHostConfig", () => { TreasureFindHostConfig.Init(); }, () => { return TreasureFindHostConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasurePrivilegeConfig", () => { TreasurePrivilegeConfig.Init(); }, () => { return TreasurePrivilegeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasureSkillConfig", () => { TreasureSkillConfig.Init(); }, () => { return TreasureSkillConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasureUpConfig", () => { TreasureUpConfig.Init(); }, () => { return TreasureUpConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TrialRewardsConfig", () => { TrialRewardsConfig.Init(); }, () => { return TrialRewardsConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("UnionLivenConfig", () => { UnionLivenConfig.Init(); }, () => { return UnionLivenConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ViewRoleFuncConfig", () => { ViewRoleFuncConfig.Init(); }, () => { return ViewRoleFuncConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("VIPAwardConfig", () => { VIPAwardConfig.Init(); }, () => { return VIPAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("VIPKillNPCConfig", () => { VIPKillNPCConfig.Init(); }, () => { return VIPKillNPCConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("VipPrivilegeConfig", () => { VipPrivilegeConfig.Init(); }, () => { return VipPrivilegeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WeatherConfig", () => { WeatherConfig.Init(); }, () => { return WeatherConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WeekPartyConfig", () => { WeekPartyConfig.Init(); }, () => { return WeekPartyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WeekPartyPointConfig", () => { WeekPartyPointConfig.Init(); }, () => { return WeekPartyPointConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WHYJRewardConfig", () => { WHYJRewardConfig.Init(); }, () => { return WHYJRewardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WindowSearchConfig", () => { WindowSearchConfig.Init(); }, () => { return WindowSearchConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WingRefineAttrConfig", () => { WingRefineAttrConfig.Init(); }, () => { return WingRefineAttrConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WingRefineExpConfig", () => { WingRefineExpConfig.Init(); }, () => { return WingRefineExpConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WorldBossConfig", () => { WorldBossConfig.Init(); }, () => { return WorldBossConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("XBGetItemConfig", () => { XBGetItemConfig.Init(); }, () => { return XBGetItemConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AlchemyConfig", () => { AlchemyConfig.Init(); }, () => { return AlchemyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AlchemySpecConfig", () => { AlchemySpecConfig.Init(); }, () => { return AlchemySpecConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AncientRobotNameConfig", () => { AncientRobotNameConfig.Init(); }, () => { return AncientRobotNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AreaCameraConfig", () => { AreaCameraConfig.Init(); }, () => { return AreaCameraConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AttrFruitConfig", () => { AttrFruitConfig.Init(); }, () => { return AttrFruitConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("BossHomeConfig", () => { BossHomeConfig.Init(); }, () => { return BossHomeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("BossInfoConfig", () => { BossInfoConfig.Init(); }, () => { return BossInfoConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("BossRebornConfig", () => { BossRebornConfig.Init(); }, () => { return BossRebornConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("bossSkillTipsConfig", () => { bossSkillTipsConfig.Init(); }, () => { return bossSkillTipsConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ChatBubbleBoxConfig", () => { ChatBubbleBoxConfig.Init(); }, () => { return ChatBubbleBoxConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ChestsConfig", () => { ChestsConfig.Init(); }, () => { return ChestsConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ChestsAwardConfig", () => { ChestsAwardConfig.Init(); }, () => { return ChestsAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ContinueSignInConfig", () => { ContinueSignInConfig.Init(); }, () => { return ContinueSignInConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CrossServerArenaConfig", () => { CrossServerArenaConfig.Init(); }, () => { return CrossServerArenaConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CrossServerBossConfig", () => { CrossServerBossConfig.Init(); }, () => { return CrossServerBossConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CTGConfig", () => { CTGConfig.Init(); }, () => { return CTGConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DailyLivenessRewardConfig", () => { DailyLivenessRewardConfig.Init(); }, () => { return DailyLivenessRewardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DailyQuestConfig", () => { DailyQuestConfig.Init(); }, () => { return DailyQuestConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DailyQuestOpenTimeConfig", () => { DailyQuestOpenTimeConfig.Init(); }, () => { return DailyQuestOpenTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DailyQuestSpecialOpenTimeConfig", () => { DailyQuestSpecialOpenTimeConfig.Init(); }, () => { return DailyQuestSpecialOpenTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DamageNumConfig", () => { DamageNumConfig.Init(); }, () => { return DamageNumConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ActorShowConfig", () => { ActorShowConfig.Init(); }, () => { return ActorShowConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DemonJarConfig", () => { DemonJarConfig.Init(); }, () => { return DemonJarConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DemonRecommondPropertyConfig", () => { DemonRecommondPropertyConfig.Init(); }, () => { return DemonRecommondPropertyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DialogConfig", () => { DialogConfig.Init(); }, () => { return DialogConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DienstgradConfig", () => { DienstgradConfig.Init(); }, () => { return DienstgradConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DirtyNameConfig", () => { DirtyNameConfig.Init(); }, () => { return DirtyNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DogzConfig", () => { DogzConfig.Init(); }, () => { return DogzConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DogzEquipPlusConfig", () => { DogzEquipPlusConfig.Init(); }, () => { return DogzEquipPlusConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonHelpBattleConfig", () => { DungeonHelpBattleConfig.Init(); }, () => { return DungeonHelpBattleConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonHintConfig", () => { DungeonHintConfig.Init(); }, () => { return DungeonHintConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonInspireConfig", () => { DungeonInspireConfig.Init(); }, () => { return DungeonInspireConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonOpenTimeConfig", () => { DungeonOpenTimeConfig.Init(); }, () => { return DungeonOpenTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonSpecialStateTimeConfig", () => { DungeonSpecialStateTimeConfig.Init(); }, () => { return DungeonSpecialStateTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonStateTimeConfig", () => { DungeonStateTimeConfig.Init(); }, () => { return DungeonStateTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ElderGodAreaConfig", () => { ElderGodAreaConfig.Init(); }, () => { return ElderGodAreaConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipDeComposeConfig", () => { EquipDeComposeConfig.Init(); }, () => { return EquipDeComposeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipGSParamConfig", () => { EquipGSParamConfig.Init(); }, () => { return EquipGSParamConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipSuitAttrConfig", () => { EquipSuitAttrConfig.Init(); }, () => { return EquipSuitAttrConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipWashConfig", () => { EquipWashConfig.Init(); }, () => { return EquipWashConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FaceConfig", () => { FaceConfig.Init(); }, () => { return FaceConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FamilyConfig", () => { FamilyConfig.Init(); }, () => { return FamilyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FamilyTechConfig", () => { FamilyTechConfig.Init(); }, () => { return FamilyTechConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FashionDressConfig", () => { FashionDressConfig.Init(); }, () => { return FashionDressConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FashionDressCabinetConfig", () => { FashionDressCabinetConfig.Init(); }, () => { return FashionDressCabinetConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FestivalRedpackTaskConfig", () => { FestivalRedpackTaskConfig.Init(); }, () => { return FestivalRedpackTaskConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FightPowerParamConfig", () => { FightPowerParamConfig.Init(); }, () => { return FightPowerParamConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FuncOpenLVConfig", () => { FuncOpenLVConfig.Init(); }, () => { return FuncOpenLVConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FuncSwitchConfig", () => { FuncSwitchConfig.Init(); }, () => { return FuncSwitchConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FunctionForecastConfig", () => { FunctionForecastConfig.Init(); }, () => { return FunctionForecastConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("GatherSoulConfig", () => { GatherSoulConfig.Init(); }, () => { return GatherSoulConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("GatherSoulComposeConfig", () => { GatherSoulComposeConfig.Init(); }, () => { return GatherSoulComposeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("GatherSoulPropertyConfig", () => { GatherSoulPropertyConfig.Init(); }, () => { return GatherSoulPropertyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("GetItemWaysConfig", () => { GetItemWaysConfig.Init(); }, () => { return GetItemWaysConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("GmCmdConfig", () => { GmCmdConfig.Init(); }, () => { return GmCmdConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("GuardConfig", () => { GuardConfig.Init(); }, () => { return GuardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("GuideConfig", () => { GuideConfig.Init(); }, () => { return GuideConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HolidayHomingConfig", () => { HolidayHomingConfig.Init(); }, () => { return HolidayHomingConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HolidayHomingPointConfig", () => { HolidayHomingPointConfig.Init(); }, () => { return HolidayHomingPointConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HorseConfig", () => { HorseConfig.Init(); }, () => { return HorseConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HorseUpConfig", () => { HorseUpConfig.Init(); }, () => { return HorseUpConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("IceLodeStarAwardConfig", () => { IceLodeStarAwardConfig.Init(); }, () => { return IceLodeStarAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("XMZZAchievementConfig", () => { XMZZAchievementConfig.Init(); }, () => { return XMZZAchievementConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CrossRealmPKOrderAwardConfig", () => { CrossRealmPKOrderAwardConfig.Init(); }, () => { return CrossRealmPKOrderAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonMixServerStateTimeConfig", () => { DungeonMixServerStateTimeConfig.Init(); }, () => { return DungeonMixServerStateTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DailyQuestMixServerStateTimeConfig", () => { DailyQuestMixServerStateTimeConfig.Init(); }, () => { return DailyQuestMixServerStateTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CrossRealmPKDanAwardConfig", () => { CrossRealmPKDanAwardConfig.Init(); }, () => { return CrossRealmPKDanAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CrossServerOneVsOneRobotConfig", () => { CrossServerOneVsOneRobotConfig.Init(); }, () => { return CrossServerOneVsOneRobotConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ArenaRobotConfig", () => { ArenaRobotConfig.Init(); }, () => { return ArenaRobotConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ArenaRobotLVConfig", () => { ArenaRobotLVConfig.Init(); }, () => { return ArenaRobotLVConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AuctionConfig", () => { AuctionConfig.Init(); }, () => { return AuctionConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AuctionItemConfig", () => { AuctionItemConfig.Init(); }, () => { return AuctionItemConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AuctionIndexConfig", () => { AuctionIndexConfig.Init(); }, () => { return AuctionIndexConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipPlaceMapConfig", () => { EquipPlaceMapConfig.Init(); }, () => { return EquipPlaceMapConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipSuitConfig", () => { EquipSuitConfig.Init(); }, () => { return EquipSuitConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipStarConfig", () => { EquipStarConfig.Init(); }, () => { return EquipStarConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("WashLevelMaxConfig", () => { WashLevelMaxConfig.Init(); }, () => { return WashLevelMaxConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipPlusEvolveConfig", () => { EquipPlusEvolveConfig.Init(); }, () => { return EquipPlusEvolveConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyValueConfig", () => { LegendPropertyValueConfig.Init(); }, () => { return LegendPropertyValueConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyConfig", () => { LegendPropertyConfig.Init(); }, () => { return LegendPropertyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipSuitNameConfig", () => { EquipSuitNameConfig.Init(); }, () => { return EquipSuitNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ReikiRootConfig", () => { ReikiRootConfig.Init(); }, () => { return ReikiRootConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HazyRegionConfig", () => { HazyRegionConfig.Init(); }, () => { return HazyRegionConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AdventureDialogueConfig", () => { AdventureDialogueConfig.Init(); }, () => { return AdventureDialogueConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonUseBuffConfig", () => { DungeonUseBuffConfig.Init(); }, () => { return DungeonUseBuffConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AlchemyCountConfig", () => { AlchemyCountConfig.Init(); }, () => { return AlchemyCountConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CollectNpcConfig", () => { CollectNpcConfig.Init(); }, () => { return CollectNpcConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasureChapterConfig", () => { TreasureChapterConfig.Init(); }, () => { return TreasureChapterConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TaskFeedbackConfig", () => { TaskFeedbackConfig.Init(); }, () => { return TaskFeedbackConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TaskFeedbackFuncConfig", () => { TaskFeedbackFuncConfig.Init(); }, () => { return TaskFeedbackFuncConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("VipPrivilegeInfoConfig", () => { VipPrivilegeInfoConfig.Init(); }, () => { return VipPrivilegeInfoConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FairyLeagueRankAwardConfig", () => { FairyLeagueRankAwardConfig.Init(); }, () => { return FairyLeagueRankAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SpiritWeaponConfig", () => { SpiritWeaponConfig.Init(); }, () => { return SpiritWeaponConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NewDropItemGroupConfig", () => { NewDropItemGroupConfig.Init(); }, () => { return NewDropItemGroupConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("OpenServerActivityConfig", () => { OpenServerActivityConfig.Init(); }, () => { return OpenServerActivityConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("RidingPetBossRewardConfig", () => { RidingPetBossRewardConfig.Init(); }, () => { return RidingPetBossRewardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ReikiRootEffectConfig", () => { ReikiRootEffectConfig.Init(); }, () => { return ReikiRootEffectConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ItemExchangeConfig", () => { ItemExchangeConfig.Init(); }, () => { return ItemExchangeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AddUpRechargeConfig", () => { AddUpRechargeConfig.Init(); }, () => { return AddUpRechargeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("BOSSFirstKillConfig", () => { BOSSFirstKillConfig.Init(); }, () => { return BOSSFirstKillConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipShenAttrConfig", () => { EquipShenAttrConfig.Init(); }, () => { return EquipShenAttrConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ItemPlusMasterConfig", () => { ItemPlusMasterConfig.Init(); }, () => { return ItemPlusMasterConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AssistThanksGiftConfig", () => { AssistThanksGiftConfig.Init(); }, () => { return AssistThanksGiftConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HorseLVUpConfig", () => { HorseLVUpConfig.Init(); }, () => { return HorseLVUpConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HorseSkinPlusConfig", () => { HorseSkinPlusConfig.Init(); }, () => { return HorseSkinPlusConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("FirstGoldConfig", () => { FirstGoldConfig.Init(); }, () => { return FirstGoldConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ActFeastTravelTaskConfig", () => { ActFeastTravelTaskConfig.Init(); }, () => { return ActFeastTravelTaskConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NPCExConfig", () => { NPCExConfig.Init(); }, () => { return NPCExConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CustomAward", () => { CustomAwardConfig.Init(); }, () => { return CustomAwardConfig.inited; }));
|
| | | }
|
| | |
|
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>();
|
| | | private static void DistributeTask()
|
| | | {
|
| | | for (var i = doingTasks.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var task = doingTasks[i];
|
| | | if (task.Completed())
|
| | | {
|
| | | PostProcess(task.taskName);
|
| | | completeCount++;
|
| | | doingTasks.RemoveAt(i);
|
| | | }
|
| | | }
|
| | |
|
| | | var workingTaskLimit = completeCount >= priorTaskCount ? maxWorkingTask : minWorkingTask;
|
| | | while (doingTasks.Count < workingTaskLimit && (priorTasks.Count > 0 || normalTasks.Count > 0))
|
| | | {
|
| | | ConfigInitTask task = null;
|
| | | if (priorTasks.Count > 0)
|
| | | {
|
| | | task = priorTasks[0];
|
| | | priorTasks.RemoveAt(0);
|
| | | }
|
| | | else
|
| | | {
|
| | | task = normalTasks[0];
|
| | | normalTasks.RemoveAt(0);
|
| | | }
|
| | |
|
| | | doingTasks.Add(task);
|
| | | task.Start();
|
| | | }
|
| | | }
|
| | |
|
| | | private static void PostProcess(string configName)
|
| | | {
|
| | | switch (configName)
|
| | | {
|
| | | case "ItemConfig":
|
| | | ItemConfig.GemItemInit();
|
| | | break;
|
| | | case "SkillConfig":
|
| | | SkillConfig.SkillClassifingInit();
|
| | | break;
|
| | | case "FuncConfigConfig":
|
| | | GeneralDefine.Init();
|
| | | break;
|
| | | case "DirtyWordConfig":
|
| | | DirtyWordConfig.DirtyWordInit();
|
| | | break;
|
| | | case "DirtyNameConfig":
|
| | | DirtyNameConfig.DirtyNameInit();
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | static int GetMinWorkingTaskCount()
|
| | | {
|
| | | switch (Application.platform)
|
| | | {
|
| | | case RuntimePlatform.Android:
|
| | | if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.2f * 1024)
|
| | | {
|
| | | return 4;
|
| | | }
|
| | | else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024)
|
| | | {
|
| | | return 2;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | case RuntimePlatform.IPhonePlayer:
|
| | | if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
|
| | | {
|
| | | return 4;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | case RuntimePlatform.OSXEditor:
|
| | | case RuntimePlatform.WindowsEditor:
|
| | | return 5;
|
| | | default:
|
| | | return 1;
|
| | | }
|
| | | }
|
| | |
|
| | | static int GetMaxWorkingTaskCount()
|
| | | {
|
| | | switch (Application.platform)
|
| | | {
|
| | | case RuntimePlatform.Android:
|
| | | if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.2f * 1024)
|
| | | {
|
| | | return 20;
|
| | | }
|
| | | else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024)
|
| | | {
|
| | | return 5;
|
| | | }
|
| | | else if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | case RuntimePlatform.IPhonePlayer:
|
| | | if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
|
| | | {
|
| | | return 5;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | case RuntimePlatform.OSXEditor:
|
| | | case RuntimePlatform.WindowsEditor:
|
| | | return 20;
|
| | | default:
|
| | | return 5;
|
| | | }
|
| | | }
|
| | |
|
| | | public delegate bool ConfigInitResult();
|
| | | public class ConfigInitTask
|
| | | {
|
| | | public string taskName;
|
| | | Action task;
|
| | | ConfigInitResult result;
|
| | |
|
| | | public ConfigInitTask(string taskName, Action task, ConfigInitResult result)
|
| | | {
|
| | | this.taskName = taskName;
|
| | | this.task = task;
|
| | | this.result = result;
|
| | | }
|
| | |
|
| | | public void Start()
|
| | | {
|
| | | task();
|
| | | }
|
| | |
|
| | | public bool Completed()
|
| | | {
|
| | | return result();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | #if UNITY_EDITOR
|
| | | public static void EditorLoad()
|
| | | {
|
| | | NPCConfig.Init(true);
|
| | | ModelResConfig.Init(true);
|
| | | IconConfig.Init(true);
|
| | | SysInfoConfig.Init(true);
|
| | | LanguageConfig.Init(true);
|
| | | RealmConfig.Init(true);
|
| | | ActorShowConfig.Init(true);
|
| | | }
|
| | | #endif
|
| | | }
|