Beispiel #1
0
        void Update()
        {
            _vibe = ExpEase.Out(_vibe, 0, -8);

            var scale = 1 + 0.5f * _vibe * Mathf.Sin(Time.time * 30);

            transform.localScale = Vector3.one * _initialScale * scale;
        }
Beispiel #2
0
        void Update()
        {
            var scale = 1 + 0.2f * _vibe * Mathf.Sin(40 * Time.time);

            scale *= 1 - 0.5f * _spin;

            _mesh.localRotation = Quaternion.AngleAxis(_spin * 360, Vector3.up);
            _mesh.localScale    = Vector3.one * scale;

            _vibe = ExpEase.Out(_vibe, 0, -8);
            _spin = ExpEase.Out(_spin, 0, -8);
        }