Exemple #1
0
        private bool IsLerpInitialized()
        {
            if (_positionLerp != null)
            {
                return(true);
            }

            if (_positionLerp == null && _mainCam)
            {
                _positionLerp = new LinkedLerp.TransformLocalPosition(transform, 1000);
                _rotationLerp = new LinkedLerp.TransformLocalRotation(_mainCam.transform, 180);
                return(true);
            }

            return(false);
        }
        private void OnEnable()
        {
            if (Application.isEditor)
            {
                if (!circleRenderer)
                {
                    circleRenderer = GetComponent <MeshRenderer>();
                }
            }

            _shadeCorners  = new LinkedLerp.MaterialFloat("_Courners", startingValue: 0, startingSpeed: 10, circleRenderer);
            _shadeSelected = new LinkedLerp.MaterialFloat("_Selected", 0, 4, circleRenderer);
            _textureFadeIn = new LinkedLerp.MaterialFloat("_TextureFadeIn", 0, 10, circleRenderer);
            _localPos      = new LinkedLerp.TransformLocalPosition(transform, 90);
            _localScale    = new LinkedLerp.TransformLocalScale(circleRenderer.transform, 120);
            _texTransition = new LinkedLerp.RendererMaterialTextureTransition(circleRenderer);
        }