public InstanceManager(Form1 form1) { this.Form1 = form1; this.uiupdate = new UIupdate(this); //this.dmae = new DmAe(this); this.writelog = new WriteLog(this); this.dm = new dmtext.CDmSoft(); pagecheck = new PageCheck.PageCheck(); this.mouse = new Mouse(this); this.time = new Time(this); this.configManager = new BaseData.ConfigManager(this); this.taskList = new BaseData.TaskList(this); this.backGroundThread = new BackgroundThread(this); this.eyLogin = new EyLoginSoft(); this.commonHelp = new CommonHelp(this); this.gameData = new GameeData(this); this.userData = new UserData(this); this.dormitory = new Events.Dormitory(this); this.equipment = new Events.Equipment(this); this.formation = new Events.Formation(this); for (int i = 0; i < 4; i++) { BaseData.UserOperationInfo user_operationinfo0 = new BaseData.UserOperationInfo(); this.gameData.User_operationInfo.Add(i, user_operationinfo0); } for (int i = 0; i < 4; i++) { BaseData.UserBattleInfo user_battleinfo = new BaseData.UserBattleInfo(); user_battleinfo.Key = i; this.gameData.User_battleInfo.Add(i, user_battleinfo); } for (int i = 0; i < 8; i++) { ShowerTime.Add(-1); } BaseData.UserAutoBattleInfo autobattleinfo = new BaseData.UserAutoBattleInfo(); this.gameData.User_AutobattleInfo.Add(0, autobattleinfo); for (int i = 0; i < 3; i++)//装备建造 { BaseData.BuildingEquipmentInfo user_buildingequipmentinfo0 = new BaseData.BuildingEquipmentInfo(); this.gameData.User_BuildingEquipmentInfo.Add(i, user_buildingequipmentinfo0); } for (int i = 0; i < 3; i++)//枪建造 { BaseData.BuildingGunInfo user_buildingguninfo0 = new BaseData.BuildingGunInfo(); this.gameData.User_BuildingGunInfo.Add(i, user_buildingguninfo0); } }
public void CheckNeedQfix(UserBattleInfo userBattleInfo) { if ((this.Hp <= userBattleInfo.FixMinPercentage) && userBattleInfo.FixMinPercentage != 0) { //快修 this.NeedToFix = true; this.NeedNFix = false; this.NeedQFix = true; return; } if ((this.Hp >= userBattleInfo.FixMaxPercentage) && userBattleInfo.FixMaxPercentage != 0) { this.NeedToFix = false; this.NeedNFix = false; this.NeedQFix = false; return; } if (userBattleInfo.FixMinPercentage == 0 && (this.Hp < userBattleInfo.FixMaxPercentage)) { //点击普通维修 this.NeedToFix = true; this.NeedNFix = true; this.NeedQFix = false; return; } if (userBattleInfo.FixMinPercentage == 0 && userBattleInfo.FixMaxPercentage == 0) { //点击普通维修 this.NeedToFix = true; this.NeedNFix = true; this.NeedQFix = false; return; } if (this.Hp < userBattleInfo.FixMinPercentage) { //快修 this.NeedToFix = true; this.NeedNFix = false; this.NeedQFix = true; return; } if (this.Hp > userBattleInfo.FixMinPercentage && userBattleInfo.FixMaxPercentage == 0) { //点击普通维修 this.NeedToFix = true; this.NeedNFix = true; this.NeedQFix = false; return; } }