Esempio n. 1
0
    IEnumerator DoShake()
    {
        while (shake.Trauma > .0f)
        {
            var result = shake.ShakeTransform(transform);
            transform.rotation = result.Item2 * rotation;
            transform.position = transform.position + result.Item1;
            yield return(null);
        }

        shakePosOffset     = Vector3.zero;
        transform.rotation = rotation;

        shakeCo = null;
    }