示例#1
0
 void OnTriggerExit(Collider coll)
 {
     if (coll.gameObject.tag == "Player")
     {
         StopCoroutine(refHM.DoDamageOTime(damageAmount, damageTotal, periodInSeconds));
     }
 }
示例#2
0
//	bool isTakingDamage;

    void OnTriggerEnter(Collider coll)
    {
        if (coll.gameObject.tag == "Player")
        {
            refHM = coll.GetComponent <HealthManager> ();
            StartCoroutine(refHM.DoDamageOTime(damageAmount, damageTotal, periodInSeconds));
        }
    }