// Token: 0x060089F3 RID: 35315 RVA: 0x00282914 File Offset: 0x00280B14 public void Initialize(GameObject go) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitializeGameObject_hotfix != null) { this.m_InitializeGameObject_hotfix.call(new object[] { this, go }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; GameObject cameraGo = Utility.FindChildGameObject(go, "0", true); GameObject animatorGo = Utility.FindChildGameObject(go, "Animation", true); base.Initialize(cameraGo, animatorGo); this.m_gameObject = go; this.m_initPosition = go.transform.localPosition; this.m_camera1 = Utility.FindChildComponent <Camera>(go, "1", true); this.m_camera2 = Utility.FindChildComponent <Camera>(go, "2", true); this.m_initOrthographicSize = this.m_camera.orthographicSize; this.m_initSplitScreenOrthographicSize = this.m_camera1.orthographicSize; this.m_camera.orthographicSize = this.m_initOrthographicSize * CameraBase.AspectScale(); Camera camera = this.m_camera1; float orthographicSize = this.m_initSplitScreenOrthographicSize * CameraBase.AspectScale(); this.m_camera2.orthographicSize = orthographicSize; camera.orthographicSize = orthographicSize; }
// Token: 0x06008A60 RID: 35424 RVA: 0x00283B0C File Offset: 0x00281D0C public void StartCutscene() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_StartCutscene_hotfix != null) { this.m_StartCutscene_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_camera.orthographicSize = this.m_initOrthographicSize * CameraBase.AspectScale(); }
// Token: 0x06008A5E RID: 35422 RVA: 0x002839E4 File Offset: 0x00281BE4 public void Initialize(GameObject go) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitializeGameObject_hotfix != null) { this.m_InitializeGameObject_hotfix.call(new object[] { this, go }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; base.Initialize(go, Utility.FindChildGameObject(go, "Animation", true)); this.m_clipAnimator = go.GetComponent <Animator>(); this.m_initOrthographicSize = this.m_camera.orthographicSize; this.m_camera.orthographicSize = this.m_initOrthographicSize * CameraBase.AspectScale(); }
// Token: 0x0600867E RID: 34430 RVA: 0x00269DDC File Offset: 0x00267FDC public void SetOrthographicSize(float size) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetOrthographicSizeSingle_hotfix != null) { this.m_SetOrthographicSizeSingle_hotfix.call(new object[] { this, size }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; if (this.m_camera == null) { return; } this.m_camera.orthographicSize = size * CameraBase.AspectScale(); }
// Token: 0x060089F4 RID: 35316 RVA: 0x00282A40 File Offset: 0x00280C40 public void StartCombat(bool splitScreen) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_StartCombatBoolean_hotfix != null) { this.m_StartCombatBoolean_hotfix.call(new object[] { this, splitScreen }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_gameObject.transform.localPosition = this.m_initPosition; this.m_camera.gameObject.SetActive(!splitScreen); this.m_camera1.gameObject.SetActive(splitScreen); this.m_camera2.gameObject.SetActive(splitScreen); this.m_camera.orthographicSize = this.m_initOrthographicSize * CameraBase.AspectScale(); Camera camera = this.m_camera1; float orthographicSize = this.m_initSplitScreenOrthographicSize * CameraBase.AspectScale(); this.m_camera2.orthographicSize = orthographicSize; camera.orthographicSize = orthographicSize; this.m_isSplitScreen = splitScreen; }
// Token: 0x06008685 RID: 34437 RVA: 0x0026A27C File Offset: 0x0026847C private void UpdateTouch(float dt) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateTouchSingle_hotfix != null) { this.m_UpdateTouchSingle_hotfix.call(new object[] { this, dt }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; for (int i = 0; i < Input.touchCount; i++) { Touch touch = Input.GetTouch(i); if (touch.fingerId < 2) { TouchStatus touchStatus = this.m_touchStatus[touch.fingerId]; if (touch.phase == TouchPhase.Began) { if (!this.IsTouchUI(touch.position)) { touchStatus.m_beginPosition = (touchStatus.m_currentPosition = (touchStatus.m_prevPosition = touch.position)); touchStatus.m_pressed = true; } } else if (touch.phase == TouchPhase.Ended || touch.phase == TouchPhase.Canceled) { touchStatus.m_pressed = false; } else if (touch.phase == TouchPhase.Moved) { touchStatus.m_currentPosition = touch.position; } } } if (Input.touchCount <= 0) { TouchStatus touchStatus2 = this.m_touchStatus[0]; if (Input.GetMouseButtonDown(0) && !this.IsTouchUI(Input.mousePosition)) { touchStatus2.m_beginPosition = (touchStatus2.m_currentPosition = (touchStatus2.m_prevPosition = Input.mousePosition)); touchStatus2.m_pressed = true; } if (Input.GetMouseButtonUp(0)) { touchStatus2.m_pressed = false; } if (Input.GetMouseButton(0)) { touchStatus2.m_currentPosition = Input.mousePosition; } } float axis = Input.GetAxis("Mouse ScrollWheel"); if (axis != 0f) { float num = 1f - axis; this.m_camera.orthographicSize = Mathf.Clamp(this.m_camera.orthographicSize / CameraBase.AspectScale() * num, this.m_viewSizeMin, this.m_viewSizeMax) * CameraBase.AspectScale(); } if (this.m_touchStatus[0].m_pressed || this.m_touchStatus[1].m_pressed) { float viewWidth = this.m_camera.orthographicSize * 2f * this.m_camera.aspect; float viewHeight = this.m_camera.orthographicSize * 2f; Vector2 position = this.m_position; if (this.m_touchStatus[0].m_pressed ^ this.m_touchStatus[1].m_pressed) { int num2 = (!this.m_touchStatus[0].m_pressed) ? 1 : 0; Vector2 vector = BattleCamera.ScreenPositionToViewPosition(this.m_touchStatus[num2].m_currentPosition - this.m_touchStatus[num2].m_prevPosition, viewWidth, viewHeight); this.m_touchStatus[num2].m_prevPosition = this.m_touchStatus[num2].m_currentPosition; position.x -= vector.x; position.y -= vector.y; } else if (this.m_touchStatus[0].m_pressed && this.m_touchStatus[1].m_pressed && axis == 0f) { Vector2 b = (this.m_touchStatus[0].m_prevPosition + this.m_touchStatus[1].m_prevPosition) * 0.5f; Vector2 a = (this.m_touchStatus[0].m_currentPosition + this.m_touchStatus[1].m_currentPosition) * 0.5f; float num3 = Vector2.Distance(BattleCamera.ScreenPositionToViewPosition(this.m_touchStatus[0].m_prevPosition, viewWidth, viewHeight), BattleCamera.ScreenPositionToViewPosition(this.m_touchStatus[1].m_prevPosition, viewWidth, viewHeight)); float num4 = Vector2.Distance(BattleCamera.ScreenPositionToViewPosition(this.m_touchStatus[0].m_currentPosition, viewWidth, viewHeight), BattleCamera.ScreenPositionToViewPosition(this.m_touchStatus[1].m_currentPosition, viewWidth, viewHeight)); this.m_touchStatus[0].m_prevPosition = this.m_touchStatus[0].m_currentPosition; this.m_touchStatus[1].m_prevPosition = this.m_touchStatus[1].m_currentPosition; Vector2 vector2 = BattleCamera.ScreenPositionToViewPosition(a - b, viewWidth, viewHeight); position.x -= vector2.x; position.y -= vector2.y; if (num3 > 0f && num4 > 0f) { this.m_camera.orthographicSize = Mathf.Clamp(this.m_camera.orthographicSize / CameraBase.AspectScale() * num3 / num4, this.m_viewSizeMin, this.m_viewSizeMax) * CameraBase.AspectScale(); } } if (dt > 0f) { this.m_touchMoveVelocity = (position - this.m_position) / dt; } this.m_position = this.ClampCameraPosition(position); } else { float magnitude = this.m_touchMoveVelocity.magnitude; if (magnitude > 0f) { float d = Math.Max(magnitude - magnitude * dt * 10f, 0f); this.m_touchMoveVelocity = this.m_touchMoveVelocity / magnitude * d; this.m_position = this.ClampCameraPosition(this.m_position + this.m_touchMoveVelocity * dt); } } }