public void TestStageUpdate() { if (_TestingStage == null) { return; } if (!UIFightBox.IsTestMode()) { UIFightBox.SetTest(); } if (UIStageSucess.IsShow() || UIStageFail.IsShow()) { TestStageInfo testInfo = new TestStageInfo(); if (UIStageSucess.IsShow()) { testInfo._IsWin = true; } else { testInfo._IsWin = false; } testInfo._Round = BattleField.Instance._BattleRound - 1; testInfo._RemainHP = (int)(((float)BattleField.Instance._RoleMotion._HP / BattleField.Instance._RoleMotion._MaxHP) * 10); testInfo._ElimitTrap = BallBox.Instance._ElimitTrapCnt; testInfo._ElimitBomb = BallBox.Instance._ElimitBombCnt; ++_TestTimes; _TestInfos[_TestingStage].Add(testInfo); LogicManager.Instance.ExitFight(); if (_TestTimes >= _DefaultTestTimes) { _TestTimes = 0; //++_CurIdx; //if (_CurIdx >= _TargetIdx) { _TestingStage = null; WriteRecords(); } //else //{ // _TestingStage = StageDataPack.Instance._StageItems[_CurIdx]; // _TestInfos.Add(_TestingStage, new List<TestStageInfo>()); // StageDataPack.Instance._FightingStage = _TestingStage; // LogicManager.Instance.EnterFight(_TestingStage); //} } else { StageDataPack.Instance._FightingStage = _TestingStage; LogicManager.Instance.EnterFight(_TestingStage); } } }
public void PassStage(StageMapRecord passStageMap) { List <AwardItem> awardList = new List <AwardItem>(); _FightingStage = LogicManager.Instance.EnterStageInfo; var baseAward = AwardManager.AddAward(_FightingStage.StageRecord.AwardType[0], _FightingStage.StageRecord.AwardValue[0]); awardList.Add(baseAward); int starCnt = 0; for (int i = 0; i < 3; ++i) { if (_FightingStage.IsStarOn(i)) { continue; } bool isGetStar = true; if (passStageMap._StarInfos.Count > i) { isGetStar = StarInfoBase.isCanGetStar(passStageMap._StarInfos[i]); } if (isGetStar) { StageDataPack.Instance.SetStageStar(_FightingStage.StageRecord.Id, i); var starAward = AwardManager.AddAward(_FightingStage.StageRecord.AwardType[i + 1], _FightingStage.StageRecord.AwardValue[i + 1]); awardList.Add(starAward); } } for (int i = 0; i < 3; ++i) { if (_FightingStage.IsStarOn(i)) { ++starCnt; } } StageDataPack.Instance.SaveClass(true); UIFightBox.HideOptMask(); UIStageSucess.ShowAsyn(_FightingStage.StageRecord, starCnt, awardList); WeaponDataPack.Instance.RefreshUnLock(); }
public void TestFightUpdate() { //return; if (!_TestMode) { return; } if (UIStageFail.IsShow()) { return; } if (UIStageSucess.IsShow()) { return; } if (Time.time - _LastOptTime > _OptWait) { TestBallMove(); _LastOptTime = Time.time; } }