Beispiel #1
0
 public void CheckCapState(FlagBase flagBase)
 {
     if (m_team != flagBase.Team)
     {
         if (m_boundingSphere.Intersects(flagBase.Sphere))
         {
             if (m_state != EntityState.Dead)
             {
                 flagBase.MadeGoal = true;
                 m_state           = EntityState.Dead;
             }
         }
     }
 }
Beispiel #2
0
 public override void Update(GameTime gt, World gameWorld)
 {
     // Flagbase null exception fix - 14/05/2014
     if (m_flagBase == null)
     {
         if (m_team == 1)
         {
             m_flagBase = gameWorld.BlueBase;
         }
         if (m_team == 2)
         {
             m_flagBase = gameWorld.RedBase;
         }
     }
     base.Update(gt, gameWorld);
 }