public void Init() { DeviceInfo.UnitMultiplier = Screen.dpi; #if UNITY_EDITOR this.m_oImp = new PCOldInputGestureImp(); #elif UNITY_ANDROID this.m_oImp = new MobileInputGestureImp(); #endif this.m_oImp.Init(); }
private void Awake() { this.module = new CGestureModule(); this.module.Init(); this.panGesture = new PanGestureCallback(); this.panGesture.Init(this); this.panGesture.StateUpdated += this.PanUpdate; this.scaleGesture = new ScaleGestureCallback(); this.scaleGesture.Init(this); this.scaleGesture.StateUpdated += this.ScaleUpdate; this.module.AddGesture(this.panGesture); this.module.AddGesture(this.scaleGesture); if (this.cameraController == null) { this.cameraController = Camera.main.GetComponent <CameraController>(); if (this.cameraController == null) { Debug.LogError("CameraController == null"); } } this.DelayScaleFrameCount = this.ScaleFrameCountInpector; }