//public void DoDamage(float damage, MyDamageType damageType, bool sync) //{ // if (MarkedToExplode) // return; // //if (!IsFunctional) // // return false; // if (sync) // { // if (Sync.IsServer) // MySyncHelper.DoDamageSynced(this, damage, damageType); // } // else // { // m_damageType = damageType; // if (damage > 0) // OnDestroy(); // } // return; //} public bool StartCountdown() { if (!IsFunctional || IsCountingDown) { return(false); } IsCountingDown = true; MyWarheads.AddWarhead(this); RaisePropertiesChanged(); UpdateEmissivity(); return(true); }
void ExplodeDelayed(int maxMiliseconds) { RemainingMS = MyUtils.GetRandomInt(maxMiliseconds); m_countdownMs = 0; MyWarheads.AddWarhead(this); }