Beispiel #1
0
 public override bool CheckCollisionWith(GameTime gameTime, GDComp other)
 {
     other.CheckCollisionWith(gameTime, this);
     return false;
 }
Beispiel #2
0
        public override bool CheckCollisionWith(GameTime gameTime, GDComp other)
        {
            //Early out if we have another ScoreBall.
            if (other is ScoreBall)
            {
                return false;
            }
            else if (other is PlayerBall)
            {
                if (CircleCircleCollision(other))
                {
                    PlayerHit(other as PlayerBall);
                    return false;
                }

                return false;
            }
            else if (other is PowerBall)
            {
                if (!Remove && ScoreState == State.Enemy &&
                    CircleCircleCollision(other))
                {
                    Spawner.GetInstance().RemoveBall(this);
                }
                return false;
            }
            else
            {
                return other.CheckCollisionWith(gameTime, this);
            }
        }