Ejemplo n.º 1
0
    IEnumerator InternalStun()
    {
        FirstPersonController controller = GetComponent <FirstPersonController>();

        if (controller != null)
        {
            controller.DisableMovement();

            float timer = 0;

            Vector3 orgPos = transform.position;
            while (timer < 3)
            {
                timer += Time.deltaTime;
                transform.position = orgPos + Random.insideUnitSphere;
                yield return(null);
            }
            controller.EnableMovement();
        }
    }