using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Transformacion : MonoBehaviour
{
    public void HumanToSlime()
    {
        StartCoroutine( FromHumanToSlime() );
    }
    private IEnumerator FromHumanToSlime()
    {
        if (this.TryGetComponent(out ColliderPosition cp))
        {
            if (this.TryGetComponent(out PlayerMove pm)) pm.enabled = false;
            cp.RepositionCollidersSlime();
            yield return new WaitForSeconds(1f);
            if (pm != null) pm.enabled = true;
        }
    }
}
