private void OnTriggerExit(Collider coll) { if (isActive) { if (coll.gameObject.tag == "Player") { PlayerHit playerHit = coll.gameObject.GetComponent <PlayerHit>(); playerHit.GetComponent <PlayerMovement>().moveSpeed = 5f; playerHit.DisableTickDamage(); } } }
private void OnTriggerEnter(Collider coll) { if (isActive) { if (coll.gameObject.tag == "Player") { PlayerHit playerHit = coll.gameObject.GetComponent <PlayerHit>(); playerHit.GetComponent <PlayerMovement>().moveSpeed = decreasedSpeed; playerHit.EnableTickDamage(damageAmount); } } }