public static void ShowStageEnsure(StageDataItem stageInfo) { Hashtable hash = new Hashtable(); hash.Add("StageInfo", stageInfo); GameCore.Instance.UIManager.ShowUI(UIConfig.UIStageEnsure, UILayer.PopUI, hash); }
public override void Show(Hashtable hash) { base.Show(hash); StageDataItem stageItem = (StageDataItem)hash["InitObj"]; ShowStageInfo(stageItem); }
public void TestStage(StageDataItem stageItem) { _TestingStage = stageItem; _TestInfos.Clear(); _TestInfos.Add(_TestingStage, new List <TestStageInfo>()); StageDataPack.Instance._FightingStage = _TestingStage; LogicManager.Instance.EnterFight(_TestingStage); }
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); } } }
private void OnChooseStage(object selectItem) { StageDataItem selectStage = (StageDataItem)selectItem; Debug.Log("OnChooseStage:" + selectStage.StageID); int stageIdx = int.Parse(selectStage.StageID) - 1; if (stageIdx <= StageDataPack.Instance.CurIdx) { UIStageEnsure.ShowStageEnsure(selectStage); } UIGuide.HideGuide(); }
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 InitStageInfo() { if (_StageItems == null) { _StageItems = new List <StageDataItem>(); } if (_StageItems.Count == 0) { foreach (var tabRecord in TableReader.StageInfo.Records) { StageDataItem stageItem = new StageDataItem(); stageItem.StageID = tabRecord.Key; stageItem.Star = 0; _StageItems.Add(stageItem); } } }
public void EnterFight(StageDataItem enterStage) { EnterStageInfo = enterStage; GameCore.Instance.UIManager.DestoryAllUI(); Hashtable hash = new Hashtable(); hash.Add("StageRecord", enterStage); GameCore.Instance.EventController.PushEvent(EVENT_TYPE.EVENT_LOGIC_ENTER_STAGE, this, hash); UIFightBattleField.ShowAsyn(); var mapRecord = StageMapRecord.ReadStageMap(enterStage.StageRecord.ScenePath); BallBox.Instance.Init(mapRecord); BallBox.Instance.InitBallInfo(); BattleField.Instance.InitBattle(enterStage.StageRecord, mapRecord); }
private void ShowStageInfo(StageDataItem stageItem) { _UIStageName.text = Tables.StrDictionary.GetFormatStr(stageItem.StageRecord.Name); }
public override void Show(Hashtable hash) { base.Show(hash); _StageInfo = (StageDataItem)hash["StageInfo"]; Refresh(); }