private void validateScore(COM_PLAYERCAMP campType, int inCampScore, int inHeadPts) { if (inHeadPts >= 0) { if (campType == Singleton <GamePlayerCenter> .instance.GetHostPlayer().PlayerCamp) { if (this.levelContext.HeadPtsUpperLimit > 0) { this._leftScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_FireHole_1"), inHeadPts, this.levelContext.HeadPtsUpperLimit); } else { this._leftScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_Normal_1"), inHeadPts); } } else if ((campType != COM_PLAYERCAMP.COM_PLAYERCAMP_MID) && (campType != COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT)) { if (this.levelContext.HeadPtsUpperLimit > 0) { this._rightScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_FireHole_2"), inHeadPts, this.levelContext.HeadPtsUpperLimit); } else { this._rightScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_Normal_2"), inHeadPts); } } } }
public bool IsHeroExistWithCamp(COM_PLAYERCAMP camp, uint heroID) { bool result = false; ListView <MemberInfo> listView = this[camp]; if (listView == null) { return(result); } for (int i = 0; i < listView.get_Count(); i++) { if (listView.get_Item(i) == null || listView.get_Item(i).ChoiceHero == null) { } for (int j = 0; j < listView.get_Item(i).ChoiceHero.Length; j++) { if (listView.get_Item(i).ChoiceHero[j].stBaseInfo.stCommonInfo.dwHeroID == heroID) { result = true; break; } } } return(result); }
public ShenFuRecord(COM_PLAYERCAMP playerCamp, uint playerId, uint shenFuId, uint onEffectTime) { this.playerCamp = playerCamp; this.playerId = playerId; this.shenFuId = shenFuId; this.onEffectTime = onEffectTime; }
private void ValidateKill(COM_PLAYERCAMP campType, int inCampScore, int inHeadPts) { if (inCampScore >= 0) { base.Current = inCampScore; } }
public int GetEnemyKillHeroMaxGap(COM_PLAYERCAMP camp) { int num = 0; int num2 = 0; this.enemyKillHeroMaxGap = 0; COM_PLAYERCAMP cOM_PLAYERCAMP = 1; if (camp == 1) { cOM_PLAYERCAMP = 2; } for (int i = 0; i < this.m_deadRecordList.get_Count(); i++) { if (this.m_deadRecordList.get_Item(i).camp == camp && this.m_deadRecordList.get_Item(i).actorType == ActorTypeDef.Actor_Type_Hero && this.m_deadRecordList.get_Item(i).killerActorType == ActorTypeDef.Actor_Type_Hero) { num2++; } else if (this.m_deadRecordList.get_Item(i).camp == cOM_PLAYERCAMP && this.m_deadRecordList.get_Item(i).actorType == ActorTypeDef.Actor_Type_Hero && this.m_deadRecordList.get_Item(i).killerActorType == ActorTypeDef.Actor_Type_Hero) { num++; } int num3 = num2 - num; if (num3 > this.enemyKillHeroMaxGap) { this.enemyKillHeroMaxGap = num3; } } return(this.enemyKillHeroMaxGap); }
private void OnTimerWarmBattle(int timerSequence) { Singleton <CTimerManager> .instance.RemoveTimer(this.m_timerSeq); CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FightForm.s_battleUIForm); if (form != null && !form.IsHided()) { this.m_timerSeq = -1; if (this.m_curCnt != this.m_maxCnt) { this.m_curCnt++; this.m_timerSeq = Singleton <CTimerManager> .instance.AddTimer(this.m_random.Next(500, 3000), 1, new CTimer.OnTimeUpHandler(this.OnTimerWarmBattle)); this.OpenSurrenderForm(this.m_maxCnt, this.m_curCnt, this.m_result); } else { this.m_haveRights = true; COM_PLAYERCAMP playerCamp = Singleton <GamePlayerCenter> .instance.GetHostPlayer().PlayerCamp; BattleLogic.ForceKillCrystal((int)playerCamp); } } }
public override void ExposeAsAttacker(COM_PLAYERCAMP attackeeCamp, int inResetTime) { int num = HorizonMarkerByFow.TranslateCampToIndex(attackeeCamp); CTimerManager instance = Singleton <CTimerManager> .instance; if (this.SetExposeMark(true, attackeeCamp, this.actor.ActorControl.DoesIgnoreAlreadyLit())) { if (this.IsDuringExposing(attackeeCamp)) { if (inResetTime <= 0) { instance.ResetTimer(this.m_exposeTimerSeq[num]); } else if (instance.GetLeftTime(this.m_exposeTimerSeq[num]) < inResetTime) { instance.ResetTimerTotalTime(this.m_exposeTimerSeq[num], inResetTime); } } else if (num == 0) { this.m_exposeTimerSeq[num] = instance.AddTimer(this.actor.ActorControl.QueryExposeDuration(), 1, new CTimer.OnTimeUpHandler(this.OnExposeOverCampOne), true); } else { this.m_exposeTimerSeq[num] = instance.AddTimer(this.actor.ActorControl.QueryExposeDuration(), 1, new CTimer.OnTimeUpHandler(this.OnExposeOverCampTwo), true); } } }
public int GetTotalNum(COM_PLAYERCAMP camp, ActorTypeDef actorType, byte actorSubType, byte actorSubSoliderType) { int num = 0; for (int i = 0; i < this.m_deadRecordList.Count; i++) { DeadRecord record = this.m_deadRecordList[i]; if (record.camp == camp) { DeadRecord record2 = this.m_deadRecordList[i]; if (record2.actorType == actorType) { DeadRecord record3 = this.m_deadRecordList[i]; if (record3.actorSubType == actorSubType) { DeadRecord record4 = this.m_deadRecordList[i]; if (record4.actorSubSoliderType == actorSubSoliderType) { num++; } } } } } return(num); }
public int GetDeadNum(COM_PLAYERCAMP camp, ActorTypeDef actorType, int subType, int cfgId) { int num = 0; for (int i = 0; i < this.m_deadRecordList.Count; i++) { DeadRecord record = this.m_deadRecordList[i]; if (camp == record.camp) { DeadRecord record2 = this.m_deadRecordList[i]; if (actorType == record2.actorType) { DeadRecord record3 = this.m_deadRecordList[i]; if (subType == record3.actorSubType) { DeadRecord record4 = this.m_deadRecordList[i]; if (cfgId == record4.cfgId) { num++; } } } } } return(num); }
public int GetKillDragonNum(COM_PLAYERCAMP killerCamp) { int num = 0; for (int i = 0; i < this.m_deadRecordList.Count; i++) { DeadRecord record = this.m_deadRecordList[i]; if (killerCamp == record.killerCamp) { DeadRecord record2 = this.m_deadRecordList[i]; if (record2.actorType == ActorTypeDef.Actor_Type_Monster) { DeadRecord record3 = this.m_deadRecordList[i]; if (record3.actorSubType == 2) { DeadRecord record4 = this.m_deadRecordList[i]; if (record4.actorSubSoliderType != 9) { DeadRecord record5 = this.m_deadRecordList[i]; if (record5.actorSubSoliderType != 7) { continue; } } num++; } } } } return(num); }
public DeadRecord GetRecordAtIndex(COM_PLAYERCAMP camp, ActorTypeDef actorType, byte actorSubType, byte actorSubSoliderType, int index) { int num = 0; for (int i = 0; i < this.m_deadRecordList.Count; i++) { DeadRecord record = this.m_deadRecordList[i]; if (record.camp == camp) { DeadRecord record2 = this.m_deadRecordList[i]; if (record2.actorType == actorType) { DeadRecord record3 = this.m_deadRecordList[i]; if (record3.actorSubType == actorSubType) { DeadRecord record4 = this.m_deadRecordList[i]; if (record4.actorSubSoliderType == actorSubSoliderType) { if (num == index) { return(this.m_deadRecordList[i]); } num++; } } } } } return(new DeadRecord()); }
public void BuildRoomInfo(COMDT_MATCH_SUCC_DETAIL roomData) { this.roomInfo = new Assets.Scripts.GameSystem.RoomInfo(); this.roomInfo.iRoomEntity = roomData.iRoomEntity; this.roomInfo.dwRoomID = roomData.dwRoomID; this.roomInfo.dwRoomSeq = roomData.dwRoomSeq; this.roomInfo.roomAttrib.bGameMode = roomData.stRoomInfo.bGameMode; this.roomInfo.roomAttrib.bPkAI = roomData.stRoomInfo.bPkAI; this.roomInfo.roomAttrib.bMapType = roomData.stRoomInfo.bMapType; this.roomInfo.roomAttrib.dwMapId = roomData.stRoomInfo.dwMapId; this.roomInfo.roomAttrib.bWarmBattle = Convert.ToBoolean(roomData.stRoomInfo.bIsWarmBattle); this.roomInfo.roomAttrib.npcAILevel = roomData.stRoomInfo.bAILevel; this.roomInfo.selfInfo.ullUid = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().playerUllUID; for (int i = 0; i < 2; i++) { COM_PLAYERCAMP camp = (COM_PLAYERCAMP)(i + 1); this.roomInfo.CampMemberList[i].Clear(); for (int j = 0; j < roomData.stMemInfo.astCampMem[i].dwMemNum; j++) { COMDT_ROOMMEMBER_DT memberDT = roomData.stMemInfo.astCampMem[i].astMemInfo[j]; MemberInfo item = this.CreateMemInfo(ref memberDT, camp, this.roomInfo.roomAttrib.bWarmBattle); this.roomInfo.CampMemberList[i].Add(item); } this.SortCampMemList(ref this.roomInfo.CampMemberList[i]); } }
private void OnRoom_ChangePos(CUIEvent uiEvent) { COM_PLAYERCAMP camp = COM_PLAYERCAMP.COM_PLAYERCAMP_1; if (uiEvent.m_eventParams.tag == 1) { camp = COM_PLAYERCAMP.COM_PLAYERCAMP_1; } else if (uiEvent.m_eventParams.tag == 2) { camp = COM_PLAYERCAMP.COM_PLAYERCAMP_2; } if (this.roomInfo != null) { uint dwMapId = this.roomInfo.roomAttrib.dwMapId; ResAcntBattleLevelInfo dataByKey = GameDataMgr.pvpLevelDatabin.GetDataByKey(dwMapId); DebugHelper.Assert(dataByKey != null); int bMaxAcntNum = dataByKey.stLevelCommonInfo.bMaxAcntNum; int freePos = this.roomInfo.GetFreePos(camp, bMaxAcntNum); if (freePos >= 0) { ReqChangeCamp(camp, freePos); } } }
private void GetMemberPosInfo(GameObject go, out COM_PLAYERCAMP Camp, out int Pos) { Camp = COM_PLAYERCAMP.COM_PLAYERCAMP_1; if (go.name.StartsWith("Left")) { Camp = COM_PLAYERCAMP.COM_PLAYERCAMP_1; } else if (go.name.StartsWith("Right")) { Camp = COM_PLAYERCAMP.COM_PLAYERCAMP_2; } Pos = 0; if (go.name.EndsWith("1")) { Pos = 0; } else if (go.name.EndsWith("2")) { Pos = 1; } else if (go.name.EndsWith("3")) { Pos = 2; } else if (go.name.EndsWith("4")) { Pos = 3; } else if (go.name.EndsWith("5")) { Pos = 4; } }
public bool IsBattleSupportVoice() { if (this.m_bGetIsBattleSupportVoice) { return(this.m_IsBattleSupportVoice); } this.m_bGetIsBattleSupportVoice = true; this.m_IsBattleSupportVoice = false; Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer(); if (hostPlayer != null) { int num = 0; COM_PLAYERCAMP playerCamp = hostPlayer.PlayerCamp; List <Player> allCampPlayers = Singleton <GamePlayerCenter> .GetInstance().GetAllCampPlayers(playerCamp); for (int i = 0; i < allCampPlayers.Count; i++) { Player player2 = allCampPlayers[i]; if ((player2 != null) && !player2.Computer) { num++; } } if (num >= 2) { this.m_IsBattleSupportVoice = true; return(true); } this.m_IsBattleSupportVoice = false; } return(false); }
public static void OnGameOverEvent(CSPkg msg) { if (Singleton <BattleLogic> .get_instance().isWaitGameEnd) { return; } if (msg.stPkgData.get_stNtfCltGameOver().bWinCamp > 0) { COM_PLAYERCAMP playerCamp = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp; Singleton <BattleLogic> .get_instance().battleStat.iBattleResult = ((playerCamp != msg.stPkgData.get_stNtfCltGameOver().bWinCamp) ? 2 : 1); COM_PLAYERCAMP camp; if (Singleton <BattleLogic> .get_instance().battleStat.iBattleResult == 1) { camp = BattleLogic.GetOppositeCmp(playerCamp); } else { camp = playerCamp; } BattleLogic.ForceKillCrystal(camp); } Singleton <CSurrenderSystem> .get_instance().DelayCloseSurrenderForm(5); }
private void OnSurrenderConfirm(CUIEvent cuiEvent) { if (this.IsWarmBattle() && !Singleton <LobbyLogic> .instance.inMultiGame) { this.m_lastSurrenderTime = (uint)CRoleInfo.GetCurrentUTCTime(); this.m_maxCnt = this.GetTotalAcnt(); this.m_curCnt = 1; if (this.m_maxCnt == 1) { COM_PLAYERCAMP playerCamp = Singleton <GamePlayerCenter> .instance.GetHostPlayer().PlayerCamp; BattleLogic.ForceKillCrystal((int)playerCamp); } else { this.m_haveRights = false; this.m_result = this.ConstrcutData(this.m_maxCnt); this.m_timerSeq = Singleton <CTimerManager> .instance.AddTimer(this.m_random.Next(500, 3000), 1, new CTimer.OnTimeUpHandler(this.OnTimerWarmBattle)); this.OpenSurrenderForm(this.m_maxCnt, this.m_curCnt, this.m_result); } } else { this.SendMsgSurrender(1); } }
public void OnShenfuStart(uint shenFuId, AreaEventTrigger trigger, TriggerActionShenFu shenFu) { if (trigger == null || shenFu == null) { return; } ShenFuObjects shenFuObjects = default(ShenFuObjects); ShenFuInfo dataByKey = GameDataMgr.shenfuBin.GetDataByKey(shenFuId); if (dataByKey == null) { return; } trigger.Radius = (int)dataByKey.dwGetRadius; string prefabName = StringHelper.UTF8BytesToString(ref dataByKey.szShenFuResPath); shenFuObjects.ShenFu = MonoSingleton <SceneMgr> .get_instance().InstantiateLOD(prefabName, false, SceneObjType.ActionRes, trigger.gameObject.transform.position); this._shenFuTriggerPool.Add(trigger.ID, shenFuObjects); if (FogOfWar.enable) { COM_PLAYERCAMP playerCamp = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp; GameFowCollector.SetObjVisibleByFow(shenFuObjects.ShenFu, Singleton <GameFowManager> .get_instance(), playerCamp); } }
public int GetFreePos(COM_PLAYERCAMP camp, int maxPlayerNum) { ListView <Assets.Scripts.GameSystem.MemberInfo> view = this[camp]; if (view != null) { for (int i = 0; i < (maxPlayerNum / 2); i++) { bool flag = false; for (int j = 0; j < view.Count; j++) { Assets.Scripts.GameSystem.MemberInfo info = view[j]; if ((info != null) && (info.dwPosOfCamp == i)) { flag = true; break; } } if (!flag) { return(i); } } } return(-1); }
public void OnHitEffect(OrganWrapper InWrapper) { COM_PLAYERCAMP actorCamp = InWrapper.actor.TheActorMeta.ActorCamp; GameObject[] objArray1 = new GameObject[] { InWrapper.actor.gameObject }; MonoSingleton <ActionManager> .GetInstance().PlayAction((actorCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? "Prefab_Characters/Prefab_Organ/Tower/TowerDamage_Blue" : "Prefab_Characters/Prefab_Organ/Tower/TowerDamage_Red", true, false, objArray1); }
private void ShowAsAttacker(COM_PLAYERCAMP attackeeCamp, int inResetTime) { int num = HorizonMarkerByFow.TranslateCampToIndex(attackeeCamp); CTimerManager instance = Singleton <CTimerManager> .instance; if (this.IsDuringShowMark(attackeeCamp)) { if (inResetTime <= 0) { instance.ResetTimer(this.m_showmarkTimerSeq[num]); } else if (instance.GetLeftTime(this.m_showmarkTimerSeq[num]) < inResetTime) { instance.ResetTimerTotalTime(this.m_showmarkTimerSeq[num], inResetTime); } } else { if (num == 0) { this.m_showmarkTimerSeq[num] = instance.AddTimer(Horizon.QueryAttackShowMarkDuration(), 1, new CTimer.OnTimeUpHandler(this.OnShowMarkOverCampOne), true); } else { this.m_showmarkTimerSeq[num] = instance.AddTimer(Horizon.QueryAttackShowMarkDuration(), 1, new CTimer.OnTimeUpHandler(this.OnShowMarkOverCampTwo), true); } this.AddShowMark(attackeeCamp, HorizonConfig.ShowMark.Jungle, 1); } }
public void ExecPauseCommand(byte pauseCommand, byte pauseByCamp, byte[] campPauseTimes) { bool flag = pauseCommand == 1; if (Singleton <WatchController> .GetInstance().IsWatching) { Singleton <WatchController> .GetInstance().IsRunning = !flag; } else { Singleton <FrameSynchr> .GetInstance().SetSynchrRunning(!flag); Singleton <FrameSynchr> .GetInstance().ResetStartTime(); } if (this._root) { this._root.CustomSetActive(flag); if (flag) { Singleton <CBattleSystem> .GetInstance().ClosePopupForms(); this._pauseNode.CustomSetActive(true); this._resumeNode.CustomSetActive(false); COM_PLAYERCAMP cOM_PLAYERCAMP = Singleton <WatchController> .GetInstance().IsWatching ? COM_PLAYERCAMP.COM_PLAYERCAMP_MID : Singleton <GamePlayerCenter> .GetInstance().hostPlayerCamp; this._pauseCampTxt.set_text(Singleton <CTextManager> .GetInstance().GetText(string.Format("PauseTips_{0}Look{1}", (int)cOM_PLAYERCAMP, (int)pauseByCamp))); this._passedSecond = 0; if ((COM_PLAYERCAMP)pauseByCamp == cOM_PLAYERCAMP) { this._waitResumeSecond = 0; } else { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(242u); this._waitResumeSecond = (int)((dataByKey != null) ? dataByKey.dwConfValue : 60u); } this.ValidateTimerState(); if (cOM_PLAYERCAMP != COM_PLAYERCAMP.COM_PLAYERCAMP_MID) { this._remainNode.CustomSetActive(true); SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); int num = curLvelContext.m_pvpPlayerNum / 2 * (int)this.MaxAllowTimes; this._remainTimesTxt.set_text((num - (int)campPauseTimes[(int)cOM_PLAYERCAMP]).ToString()); } else { this._remainNode.CustomSetActive(false); } if (this._pauseTimer == 0) { this._pauseTimer = Singleton <CTimerManager> .GetInstance().AddTimer(1000, -1, new CTimer.OnTimeUpHandler(this.OnPauseTimer), false); } } else { Singleton <CTimerManager> .GetInstance().RemoveTimerSafely(ref this._pauseTimer); } } }
public static void SetConfirmFakeData() { CFakePvPHelper.RemoveAllFakeTimer(); CFakePvPHelper.DatabinCheck(); CFakePvPHelper.RealPlayerConfirmNum = 0; CFakePvPHelper.FakePlayerConfirmNum = 0; CFakePvPHelper.FakePlayerList.Clear(); RoomInfo roomInfo = Singleton <CRoomSystem> .GetInstance().roomInfo; DebugHelper.Assert(roomInfo != null); DebugHelper.Assert(roomInfo.roomAttrib.bWarmBattle); for (COM_PLAYERCAMP cOM_PLAYERCAMP = 1; cOM_PLAYERCAMP < 3; cOM_PLAYERCAMP++) { ListView <MemberInfo> listView = roomInfo[cOM_PLAYERCAMP]; for (int i = 0; i < listView.get_Count(); i++) { MemberInfo memberInfo = listView.get_Item(i); if (memberInfo.RoomMemberType == 2u) { CFakePvPHelper.FakePlayerConfirm fakePlayerConfirm = new CFakePvPHelper.FakePlayerConfirm(); fakePlayerConfirm.FakePlayer = memberInfo.WarmNpc; fakePlayerConfirm.confirmWaitTime = Random.Range(2, 11); CFakePvPHelper.FakePlayerList.Add(fakePlayerConfirm); } } } }
public override void AddHideMark(COM_PLAYERCAMP targetCamp, HorizonConfig.HideMark hm, int count, bool bForbidFade = false) { if (hm == HorizonConfig.HideMark.Jungle || targetCamp == null) { return; } if (targetCamp == 3) { for (int i = 0; i < this._campMarkers.Length; i++) { if (i != HorizonMarkerByFow.TranslateCampToIndex(this.actor.TheActorMeta.ActorCamp)) { HorizonMarkerByFow.CampMarker campMarker = this._campMarkers[i]; campMarker.AddHideMark(hm, count); Player hostPlayer = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer(); if (hostPlayer != null && hostPlayer.PlayerCamp == HorizonMarkerByFow.TranslateIndexToCamp(i)) { this.RefreshVisible(); } } } } else { HorizonMarkerByFow.CampMarker campMarker2 = this._campMarkers[HorizonMarkerByFow.TranslateCampToIndex(targetCamp)]; campMarker2.AddHideMark(hm, count); Player hostPlayer2 = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer(); if (hostPlayer2 != null && targetCamp == hostPlayer2.PlayerCamp) { this.RefreshVisible(); } } }
public int GetFreePos(COM_PLAYERCAMP camp, int maxPlayerNum) { int result = -1; ListView <MemberInfo> listView = this[camp]; if (listView == null) { return(result); } for (int i = 0; i < maxPlayerNum / 2; i++) { bool flag = false; for (int j = 0; j < listView.get_Count(); j++) { MemberInfo memberInfo = listView.get_Item(j); if (memberInfo != null && (ulong)memberInfo.dwPosOfCamp == (ulong)((long)i)) { flag = true; break; } } if (!flag) { result = i; break; } } return(result); }
public static void SetSwapTimer(int totalSec, COM_PLAYERCAMP camp = COM_PLAYERCAMP.COM_PLAYERCAMP_1, int pos = 0) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CRoomSystem.PATH_ROOM); if (form == null || form.gameObject == null) { return; } int num = 1; int num2 = 2; for (int i = num; i <= num2; i++) { COM_PLAYERCAMP cOM_PLAYERCAMP = (COM_PLAYERCAMP)i; for (int j = 0; j < 5; j++) { string path = string.Format("Panel_Main/{0}{1}/Occupied/TimerSwap", (cOM_PLAYERCAMP == COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? "LeftPlayers/Left_Player" : "RightPlayers/Right_Player", j + 1); GameObject gameObject = Utility.FindChild(form.gameObject, path); if (camp == cOM_PLAYERCAMP && pos == j && totalSec > 0) { gameObject.CustomSetActive(true); CUITimerScript component = gameObject.GetComponent <CUITimerScript>(); component.SetTotalTime((float)totalSec); component.m_eventIDs[1] = enUIEventID.Room_ChangePos_TimeUp; component.ReStartTimer(); } else { gameObject.CustomSetActive(false); } } } }
private void validateScore(COM_PLAYERCAMP campType, int inCampScore, int inHeadPts) { if (inHeadPts < 0) { return; } if (campType == Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp) { if (this.levelContext.m_headPtsUpperLimit > 0) { this._leftScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_FireHole_1"), inHeadPts, this.levelContext.m_headPtsUpperLimit); } else { this._leftScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_Normal_1"), inHeadPts); } } else if (campType != null && campType != 3) { if (this.levelContext.m_headPtsUpperLimit > 0) { this._rightScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_FireHole_2"), inHeadPts, this.levelContext.m_headPtsUpperLimit); } else { this._rightScore.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ScoreBoard_Normal_2"), inHeadPts); } } }
public HeroInfoItem(COM_PLAYERCAMP _listCamp, int _listIndex, HeroKDA _heroKDA, GameObject baseInfoItem, GameObject equipInfoItem) { this.listCamp = _listCamp; this.listIndex = _listIndex; this._heroInfo = _heroKDA; this._baseInfoItem = baseInfoItem; this._equipInfoItem = equipInfoItem; this._baseInfoItem.GetComponent <CUIEventScript>().enabled = true; this._headImg = Utility.GetComponetInChild <Image>(baseInfoItem, "Head"); this._reviveTxt = Utility.GetComponetInChild <Text>(baseInfoItem, "Revive"); this._levelText = Utility.GetComponetInChild <Text>(baseInfoItem, "Level"); this._kdaText = Utility.GetComponetInChild <Text>(baseInfoItem, "KDA"); this._moneyText = Utility.GetComponetInChild <Text>(baseInfoItem, "Money"); this._emptyGo = Utility.FindChild(baseInfoItem, "Empty"); this._emptyGo.CustomSetActive(false); this._equipInfoItem.GetComponent <CUIEventScript>().enabled = true; this._equipIcons = new Image[6]; for (int i = 0; i < 6; i++) { this._equipIcons[i] = Utility.GetComponetInChild <Image>(equipInfoItem, "Icon_" + i); this._equipIcons[i].gameObject.CustomSetActive(true); } this._headImg.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_BustCircleSmall_Dir, CSkinInfo.GetHeroSkinPic((uint)this._heroInfo.HeroId, 0)), Singleton <CBattleSystem> .GetInstance().WatchFormScript, true, false, false); this.ValidateLevel(); this.ValidateKDA(); this.ValidateMoney(); this.ValidateEquip(); this.ValidateReviceCD(); }
public override void UpdateLogic(int delta) { if (this.IsEnabled()) { for (int i = 0; i < this._campMarkers.Length; i++) { this._campMarkers[i].UpdateLogic(); } if (!Singleton <WatchController> .GetInstance().IsWatching&& this.actor.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Organ) { Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer(); if (hostPlayer != null) { COM_PLAYERCAMP playerCamp = hostPlayer.PlayerCamp; if (this.actor.TheActorMeta.ActorCamp != playerCamp) { if (this.actor.VisibleIniting) { this.actor.Visible = this.IsVisibleFor(playerCamp); } else if (this.actor.Visible && !this.IsVisibleFor(playerCamp)) { this.actor.Visible = false; } } } } } }
public static void BeginFakeSelectHero() { HeroConfirmedPlayerNum = 0; FakeHeroSelectList.Clear(); ChosenHeroes.Clear(); EnemyChosenHeroes.Clear(); Assets.Scripts.GameSystem.RoomInfo roomInfo = Singleton <CRoomSystem> .GetInstance().roomInfo; DebugHelper.Assert(roomInfo != null); DebugHelper.Assert(roomInfo.roomAttrib.bWarmBattle); COM_PLAYERCAMP selfCamp = roomInfo.GetSelfCamp(); for (int i = 0; i < roomInfo.CampMemberList[((int)selfCamp) - 1].Count; i++) { MemberInfo info2 = roomInfo.CampMemberList[((int)selfCamp) - 1][i]; if (info2.RoomMemberType == 2) { FakeHeroSelect item = new FakeHeroSelect { FakePlayer = info2.WarmNpc, maxChangeHeroCount = UnityEngine.Random.Range(1, 4), nextActionSec = UnityEngine.Random.Range(3, 6) }; FakeHeroSelectList.Add(item); } } if (FakeHeroSelectList.Count > 0) { Singleton <CTimerManager> .GetInstance().AddTimer(0x3e8, 60, new CTimer.OnTimeUpHandler(CFakePvPHelper.UpdateFakeSelectHero)); bInFakeSelect = true; } Singleton <CTimerManager> .GetInstance().AddTimer(0xea60, 1, new CTimer.OnTimeUpHandler(CFakePvPHelper.OnSelectHeroTimeout)); }