public bool Breaker(float Hit_Energy) { lives.loseLife(); if (lives.getLives() <= 0) { Penetration(); return(true); } else if (lives.getLives() <= 1) { Trouble(); return(false); } else { return(false); } /* * if ( Hit_Energy >= Durability ) { * Penetration(); * return true ; * } else if ( Hit_Energy >= Sub_Durability ) { * Trouble(); * return false ; * } else { * return false ; * }*/ }
public bool Breaker(float Hit_Energy) //only called on current_player == 2 { lives.loseLife(); if (lives.getLives() <= 0) { //Penetration (); if (ai_id == 0) // own tank { transform.root.GetChild(0).GetComponent <Turret_Controller_VR>().Alert_Turret_Penetration(); } else // ai on authority { transform.root.GetChild(0).GetComponent <AI_Controller_VR>().Alert_Turret_Penetration(ai_id); } return(true); } else if (lives.getLives() <= 1) { //Trouble (); return(false); } else { return(false); } /* * if ( Hit_Energy >= Durability ) { * Penetration(); * return true ; * } else if ( Hit_Energy >= Sub_Durability ) { * Trouble(); * return false ; * } else { * return false ; * }*/ }