public override void TakeHit(XSonic.Characters.Sonic hitter, GameLevel level, out bool blocking)
        {
            // create life mushroom and deactivate
            blocking = true;
            active = false;

            LifeMushroom temp = new LifeMushroom(new Vector2(this.Location.X, this.Location.Y + 48), new Vector2(48, 48));
            temp.ParentLevel = level;
            level.AddObjects.Add(temp);
        }
 public override void TakeHit(XSonic.Characters.Sonic hitter, GameLevel level, out bool blocking)
 {
     passed = 0.0f;
     activated = true;
     blocking = true;
     hitter.Coins++;
     coinsLeft--;
     if(coinsLeft == 0) active = false;
     MovingAnchoredAnimation maa = new MovingAnchoredAnimation(3.0f, new Point[] { new Point((int)this.Location.X, (int)this.Location.Y+48), new Point((int)this.Location.X, (int)this.Location.Y + 144) }, 16, 0, 3, 0, 48, 48, Coin.SpinCoin, true);
     (XSonicGame.CurrentGame.Services.GetService(typeof(AnimationManager)) as AnimationManager).Add(maa);
     (XSonicGame.CurrentGame.Services.GetService(typeof(AudioManager)) as AudioManager).PlaySound("coins");
 }