Ejemplo n.º 1
0
        public ObjectMouseUniformScaleSettingsView(ObjectMouseUniformScaleSettings settings)
        {
            _settings = settings;

            ToggleVisibilityBeforeRender = true;
            VisibilityToggleLabel        = "Uniform Mouse Scale Settings";
            IndentContent = true;
        }
        public void Begin(GameObject gameObject, ObjectMouseUniformScaleSettings uniformScaleSettings)
        {
            if (gameObject != null && !_isActive)
            {
                _isActive   = true;
                _gameObject = gameObject;
                _cursorPosAtSessionStart = MouseCursor.Instance.Position;

                _gameObject           = gameObject;
                _gameObjectTransform  = gameObject.transform;
                _uniformScaleSettings = uniformScaleSettings;
                _accumulatedScale     = 0.0f;

                _objectGlobalScaleAtSessionStart = _gameObjectTransform.lossyScale;
                _fromPivotPointToObjectPos       = _gameObjectTransform.position - _pivotPoint;
            }
        }