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

public class respawn : MonoBehaviour {
    GameObject player;
    bool summon = false;

    void Update()
    {
        player = GameObject.FindGameObjectWithTag("Player");
    }

    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject == player)
        {
            summon = true;
            Debug.Log("check true");
        }
    }

    void OnTriggerExit(Collider other)
    {
        if(other.gameObject==player)
        {
            summon = false;
            Debug.Log("check false");
        }
    }
}