public void SetFocusActor(PoolObjHandle <ActorRoot> focus) { if (this.MobaCamera == null) { GameObject obj2 = GameObject.Find("MainCamera"); if (obj2 != null) { this.MobaCamera = obj2.GetComponent <Moba_Camera>(); SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext(); if ((curLvelContext != null) && curLvelContext.bCameraFlip) { this.MobaCamera.settings.rotation.defualtRotation = new Vector2(this.MobaCamera.settings.rotation.defualtRotation.x, 180f); this.MobaCamera.currentCameraRotation = (Vector3)this.MobaCamera.settings.rotation.defualtRotation; } this.MobaCamera.currentZoomRate = GameSettings.CameraHeightRateValue; } } if (this.MobaCamera != null) { this.MobaCamera.SetTargetTransform(focus); this.MobaCamera.SetCameraLocked(true); } Singleton <CBattleSystem> .GetInstance().EndCameraDrag(); }
private void SwitchCameraZoom() { if (Singleton <WatchController> .GetInstance().IsLiveCast) { Moba_Camera mobaCamera = MonoSingleton <CameraSystem> .GetInstance().MobaCamera; if (null != mobaCamera) { mobaCamera.currentZoomRate = ((mobaCamera.currentZoomRate > 1f) ? 1f : 2f); mobaCamera.CameraUpdate(); } } }
public void SpawnPlayer(int team, string character) { //Currently Players will only spawn on red side, ill need to change this to make it its own void GameObject mySpawn = redSpawn[Random.Range(0, redSpawn.Length)]; GameObject myPlayer = PhotonNetwork.Instantiate(character, mySpawn.transform.position, mySpawn.transform.rotation, 0); //Turns off Champ Selection Camera standbyCamera.SetActive(false); GameObject mobaCam = PhotonNetwork.Instantiate("MobaCam", mySpawn.transform.position, mySpawn.transform.rotation, 0); Moba_Camera mobCamScript = mobaCam.GetComponent <Moba_Camera>(); mobCamScript.settings.lockTargetTransform = myPlayer.transform; }
public void Update() { Moba_Camera mobaCamera = MonoSingleton <CameraSystem> .GetInstance().MobaCamera; if (null != mobaCamera) { float num = this.m_targetScaleVal - mobaCamera.currentZoomRate; float num2 = Math.Abs(num); if (num2 >= 0.05f) { int arg_49_0 = (num > 0f) ? 1 : -1; mobaCamera.currentZoomRate += num * 0.25f; mobaCamera.CameraUpdate(); } else { mobaCamera.currentZoomRate = this.m_targetScaleVal; } } }
public void SetFocusActor(PoolObjHandle <ActorRoot> focus) { if (this.MobaCamera == null) { GameObject gameObject = GameObject.Find("MainCamera"); if (gameObject != null) { this.MobaCamera = gameObject.GetComponent <Moba_Camera>(); SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext(); if (curLvelContext != null && curLvelContext.m_isCameraFlip) { this.MobaCamera.settings.rotation.defualtRotation = new Vector2(this.MobaCamera.settings.rotation.defualtRotation.x, 180f); this.MobaCamera.currentCameraRotation = this.MobaCamera.settings.rotation.defualtRotation; } this.MobaCamera.currentZoomRate = this.GetZoomRate(); } } if (this.MobaCamera != null) { this.MobaCamera.SetTargetTransform(focus); this.MobaCamera.SetCameraLocked(true); } }
private static bool IsEqual(Vector3 InFirst, Vector3 InSecond) { return(Moba_Camera.IsEqual(InFirst.x, InSecond.x) && Moba_Camera.IsEqual(InFirst.y, InSecond.y) && Moba_Camera.IsEqual(InFirst.y, InSecond.y)); }
private static bool IsEqual(Plane InFirst, Plane InSecond) { return(Moba_Camera.IsEqual(InFirst.normal, InSecond.normal) && Moba_Camera.IsEqual(InFirst.distance, InSecond.distance)); }
private void Start() { mobaCamera = Camera.main.GetComponentInParent<Moba_Camera>(); }
public void BattleStart() { if (this._heroWrapDict != null) { return; } this._lastUpdateFrame = 0u; this.TargetHeroId = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().Captain.handle.ObjID; this._heroWrapDict = new DictionaryView <uint, HeroInfoItem>(); if (WatchForm.IsNeedShowCampMidInterface()) { this._heroWrapSideDict = new DictionaryView <uint, HeroInfoSideItem>(); } List <HeroKDA> list = new List <HeroKDA>(); List <HeroKDA> list2 = new List <HeroKDA>(); CPlayerKDAStat playerKDAStat = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat; DictionaryView <uint, PlayerKDA> .Enumerator enumerator = playerKDAStat.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <uint, PlayerKDA> current = enumerator.Current; PlayerKDA value = current.get_Value(); if (value.PlayerCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_1) { ListView <HeroKDA> .Enumerator enumerator2 = value.GetEnumerator(); while (enumerator2.MoveNext()) { list.Add(enumerator2.Current); } } else if (value.PlayerCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_2) { ListView <HeroKDA> .Enumerator enumerator3 = value.GetEnumerator(); while (enumerator3.MoveNext()) { list2.Add(enumerator3.Current); } } } this.InitCampInfoUIList(COM_PLAYERCAMP.COM_PLAYERCAMP_1, list, this._camp1BaseList, this._camp1EquipList, this._camp1BaseSideList); this.InitCampInfoUIList(COM_PLAYERCAMP.COM_PLAYERCAMP_2, list2, this._camp2BaseList, this._camp2EquipList, this._camp2BaseSideList); Singleton <WatchController> .GetInstance().SwitchObserveCamp(COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT); this.FocusHero(this.TargetHeroId); this.ValidateCampMoney(); if (this._heroInfoHud != null) { this._heroInfoHud.FightStart(); } this.RegisterEvents(); this._isBottomFold = false; this._isCampFold_1 = false; this.OnClickCampFold_1(null); this._isCampFold_2 = false; this.OnClickCampFold_2(null); this._isBottomLong = true; this.OnClickBottomEquipFold(null); this._isViewHide = false; float step = 150u * Singleton <WatchController> .GetInstance().FrameDelta * 0.001f; this.moneySample = new SampleData(step); this.expSample = new SampleData(step); this.dragonKillInfos.Clear(); this._lastSampleTime = 0f; Moba_Camera mobaCamera = MonoSingleton <CameraSystem> .GetInstance().MobaCamera; this.m_targetScaleVal = 1.2f; if (null != mobaCamera) { mobaCamera.currentZoomRate = 1.2f; mobaCamera.CameraUpdate(); } }