예제 #1
0
        //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);
        }
예제 #2
0
 void ExplodeDelayed(int maxMiliseconds)
 {
     RemainingMS   = MyUtils.GetRandomInt(maxMiliseconds);
     m_countdownMs = 0;
     MyWarheads.AddWarhead(this);
 }