Exemple #1
0
        public bool Exist(MyInfluenceSphereBase influenceSphere)
        {
            if (influenceSphere is MyInfluenceSphereDust)
            {
                return(m_dustSpheresSAP.Contains(influenceSphere));
            }
            else if (influenceSphere is MyInfluenceSphereSound)
            {
                return(m_soundSpheresSAP.Contains(influenceSphere));
            }

            return(false);
        }
Exemple #2
0
 //  Use this method to remove any type of influence sphere
 public void Remove(MyInfluenceSphereBase influenceSphere)
 {
     if (Exist(influenceSphere))
     {
         if (influenceSphere is MyInfluenceSphereDust)
         {
             m_dustSpheresSAP.Remove(influenceSphere);
         }
         else if (influenceSphere is MyInfluenceSphereSound)
         {
             m_soundSpheresSAP.Remove(influenceSphere);
         }
         else
         {
             throw new MyMwcExceptionApplicationShouldNotGetHere();
         }
     }
 }
 //  Use this method to remove any type of influence sphere
 public void Remove(MyInfluenceSphereBase influenceSphere)
 {
     if (Exist(influenceSphere))
     {
         if (influenceSphere is MyInfluenceSphereDust)
         {
             m_dustSpheresSAP.Remove(influenceSphere);
         }
         else if (influenceSphere is MyInfluenceSphereSound)
         {
             m_soundSpheresSAP.Remove(influenceSphere);
         }
         else
         {
             throw new MyMwcExceptionApplicationShouldNotGetHere();
         }
     }
 }
 public bool Exist(MyInfluenceSphereBase influenceSphere)
 {
     if (influenceSphere is MyInfluenceSphereDust)
     {
         return m_dustSpheresSAP.Contains(influenceSphere);
     }
     else if (influenceSphere is MyInfluenceSphereSound)
     {
         return m_soundSpheresSAP.Contains(influenceSphere);
     }
     
     return false;
 }