Example #1
0
    private IEnumerator possessRoutine(Movement movement)
    {
        if (movement == null)
        {
            yield break;
        }

        rigidBody.velocity        = Vector2.zero;
        CurrentController.enabled = false;
        transform.parent          = movement.transform;

        yield return(FadeInto(movement.gameObject));

        CurrentController.Possess(movement);
        CurrentController.enabled = true;
    }