void OnTriggerEnter(Collider other) { if (numTechnic == (int)Technic.onde_choc) { switch (other.tag) { case Constants._EnnemisTag: Vector3 dir = Vector3.Normalize(other.transform.position - transform.position); AbstractObject enn = other.GetComponentInChildren <AbstractObject>(); if (!enn) { return; } enn.Degat(dir * puissanceOnde, (int)Technic.onde_choc); break; case Constants._ObsPropSafe: GlobalManager.GameCont.MeshDest.SplitMesh(other.gameObject, control.transform, 100, 3); break; //case tag bibli } } else if (canPunc && (other.gameObject.tag == Constants._EnnemisTag || other.gameObject.tag == Constants._ObsPropSafe)) { AbstractObject tryGet = other.GetComponentInChildren <AbstractObject> ( ); if (!tryGet) { return; } Vector3 getProj = projection_basic; switch (numTechnic) { case (int)Technic.basic_punch: if (RightPunch) { getProj.x *= Random.Range(-getProj.x, -getProj.x / 2); } else { getProj.x *= Random.Range(getProj.x / 2, getProj.x); } tryGet.Degat(getProj, numTechnic); break; case (int)Technic.double_punch: tryGet.Degat(projection_double, numTechnic); break; } MadnessMana("Double"); } else if (other.gameObject.tag == Constants._MissileBazoo) { other.gameObject.GetComponent <MissileBazooka>().ActiveTir(-other.gameObject.GetComponent <MissileBazooka>().GetDirection(), facteurVitesseRenvoie, true); MadnessMana("Double"); } }