Ejemplo n.º 1
0
 public void SetPareWarp(GameObject pareWarp)
 {
     this.pareWarpPrefab = pareWarp;
     this.exitWarp       = pareWarpPrefab.GetComponent <Warp>();
     StartCoroutine(DelayMethod(1f, () =>
     {
         SetUseAble();
         exitWarp.SetUseAble();
     }));
 }
Ejemplo n.º 2
0
    private void OnTriggerEnter(Collider other)
    {
        GameObject hitOb = other.gameObject.transform.root.gameObject;

        if (warpAble && (hitOb.CompareTag("Player")))
        {
            SEManager.PlayWarpSound();
            SetUseNotAble();
            exitWarp.SetUseNotAble();
            hitOb.transform.position = pareWarpPrefab.transform.position;
            StartCoroutine(DelayMethod(3f, () =>
            {
                SetUseAble();
                exitWarp.SetUseAble();
            }));
        }
    }