public void AnimateCrashingFootball(Vector2 speedBeforeCrashing, Vector2 positionBeforeCrashing,
            float scaleBeforeCrashing, float radiusBeforeCrashing)
        {
            speedCrashing = speedBeforeCrashing*0.5f;
            positionCrashing = positionBeforeCrashing;
            scaleCrashing = scaleBeforeCrashing;
            radiusCrashing = radiusBeforeCrashing;
            isCrashing = true;

            positionCrashing.Y = this.game.GameHeight() - 2 * (radiusCrashing);
            crashAlphaValue = 200;
            crashAlphaDecrementPerSecond = 200f / timeOfCrash;
            SoundStuff footballCrashingSoundStuff = new SoundStuff(footballCrashingSound);
            footballCrashingSoundStuff.Play();
        }
 private void playBallShrunkSound()
 {
     SoundStuff footballShrunkSoundStuff = new SoundStuff(footballShrunkSound);
     footballShrunkSoundStuff.Play();
     //footballShrunkSound.Play();
 }
示例#3
0
        public Boolean Update(GameTime gameTime)
        {
            Football football = this.game.football;
            if (this.fIsDrawing && this.isAchieving(football))
            {
                this.fIsDrawing = false;
                this.hasAchieved = true;
                this.UpdateStatsOnAchieving();
                SoundStuff starAchievedSoundStuff = new SoundStuff(StarAchievedSound);
                starAchievedSoundStuff.Play();
            }

            // only update if you are actually drawing
            if (this.fIsDrawing)
            {
                if (this.timeAppeared > this.timeToAppear)
                {
                    //CancelDrawing();
                    this.fIsDrawing = false;
                    return false;
                }
                return true;
            }
            return false;
        }