Exemplo n.º 1
0
        public override void OnUpdate()
        {
            base.OnUpdate();
            if (RTSCamera == null)
            {
                return;
            }
            if (BattleMgr != null &&
                BattleMgr.IsInBattle)
            {
                var data        = SettingsData;
                var zoomPercent = ZoomPercent;
                RTSCamera.DesktopMoveDragSpeed = (zoomPercent * RTSCamera.desktopMoveDragSpeed) * data.CameraMoveSpeed * SpeedFaction;
                RTSCamera.DesktopMoveSpeed     = (zoomPercent * RTSCamera.desktopMoveSpeed) * data.CameraMoveSpeed * SpeedFaction;
                RTSCamera.DesktopScrollSpeed   = (zoomPercent * RTSCamera.desktopScrollSpeed) * data.CameraScrollSpeed * SpeedFaction;
                RTSCamera.DesktopRotateSpeed   = RTSCamera.desktopRotateSpeed;

                RTSCamera.TouchMoveDragSpeed = RTSCamera.touchMoveDragSpeed * data.CameraMoveSpeed * SpeedFaction;
                RTSCamera.TouchMoveSpeed     = RTSCamera.touchMoveSpeed * data.CameraMoveSpeed * SpeedFaction;
                RTSCamera.TouchScrollSpeed   = RTSCamera.touchScrollSpeed * data.CameraScrollSpeed * SpeedFaction;
                RTSCamera.TouchRotateSpeed   = RTSCamera.touchRotateSpeed;

                RTSCamera.ScreenEdgeMoveControl(IsScreenEdgeControl);
                RTSCamera.ScrollControl(IsScrollControl);
                RTSCamera.DragControl(IsDragControl);
                RTSCamera.ControlDisabled.Set(IsControlDisabled);
            }
            else
            {
                RTSCamera.ControlDisabled.Set(true);
            }
        }