void OnTriggerEnter(Collider other)
{
if(attack!=null){
if(other.tag.Equals("Enemy")){
attack.GetComponent<Attack>().enemyCollisionEnter(other.gameObject,other.ClosestPointOnBounds(transform.position));
}else{
attack.GetComponent<Attack>().otherCollisionEnter(other.gameObject,other.ClosestPointOnBounds(transform.position));
}
}
if (debug != null) {
debug.SetActive (true);
wasEnabled = false;
}
}