Beispiel #1
0
        public override bool CollisionResponse(AbstractGameObject gameObject, Side side, GameTime gameTime)
        {
            ManageBouncing(gameObject, side);
            ManageFlagPoleCount(gameObject, side);

            if ((((gameObject is HiddenBrickObject && side != Side.Top && !gameObject.Visible) ||
                  (gameObject is HiddenBrickObject && side == Side.Top && !gameObject.Visible && (ActionState is MarioFall2))) ||
                 gameObject is CoinObject || gameObject is GreenMushroomObject))
            {
                return(false);
            }

            bool retVal1 = PowerupState.CollisionResponse(gameObject, side, gameTime);
            bool retVal2 = ActionState.CollisionResponse(gameObject, side, gameTime);

            return(retVal1 || retVal2);
        }
Beispiel #2
0
 public override void CollisionResponse(ICollision collidedObject)
 {
     PowerState.CollisionResponse(collidedObject);
     ActionState.CollisionResponse(collidedObject);
 }