Example #1
0
            public void Update(CloudGame game)
            {
                if (Burst)
                {
                    return;
                }

                CloudPosition += CloudSpeed;

                if (CloudPosition.X > game.GraphicsDevice.Viewport.Width / 10)
                {
                    CloudPosition.X = -15;
                    CloudPosition.Y = rand.Next(game.animationHeight);
                    CloudPosition.Z = rand.Next(game.animationDepth);
                }

                //if (CloudContains(game.PinVector))
                //{
                //    CloudPopSound.Play();
                //    Burst = true;
                //    return;
                //}
                Matrix cloudWorldMatrix = Matrix.CreateTranslation(CloudPosition);

                if (IsCollision(model, cloudWorldMatrix, game.pinModel, game.pinModelMatrix))
                {
                    CloudPopSound.Play();
                    Burst = true;
                    return;
                }
            }
Example #2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (CloudGame game = new CloudGame())
     {
         game.Run();
     }
 }
Example #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (CloudGame game = new CloudGame())
     {
         game.Run();
     }
 }
Example #4
0
 public void Draw(CloudGame game)
 {
     if (!Burst)
     {
         game.spriteBatch.Draw(CloudTexture, CloudPosition, Color.White);
     }
 }
Example #5
0
 public void Draw(CloudGame game)
 {
     if (!Burst)
     {
         //game.spriteBatch.Draw(CloudTexture, CloudPosition, Color.White);
         Matrix world = Matrix.CreateTranslation(CloudPosition);
         game.DrawModel(model, world, game.view, game.projection);
     }
 }
Example #6
0
            public void Update(CloudGame game)
            {
                if (Burst)
                {
                    return;
                }

                CloudPosition += CloudSpeed;

                if (CloudPosition.X > game.GraphicsDevice.Viewport.Width)
                {
                    CloudPosition.X = -CloudTexture.Width;
                    CloudPosition.Y = rand.Next(game.GraphicsDevice.Viewport.Height - CloudTexture.Height);
                }

                if (CloudContains(game.PinVector))
                {
                    CloudPopSound.Play();
                    Burst = true;
                    return;
                }
            }
Example #7
0
            public void Update(CloudGame game)
            {
                if (Burst) return;

                CloudPosition += CloudSpeed;

                if (CloudPosition.X > game.GraphicsDevice.Viewport.Width/10)
                {
                    CloudPosition.X = -15;
                    CloudPosition.Y = rand.Next(game.animationHeight);
                    CloudPosition.Z = rand.Next(game.animationDepth);
                }

                //if (CloudContains(game.PinVector))
                //{
                //    CloudPopSound.Play();
                //    Burst = true;
                //    return;
                //}
                Matrix cloudWorldMatrix = Matrix.CreateTranslation(CloudPosition);

                if (IsCollision(model, cloudWorldMatrix, game.pinModel, game.pinModelMatrix))
                {
                    CloudPopSound.Play();
                    Burst = true;
                    return;
                }
            }
Example #8
0
 public void Draw(CloudGame game)
 {
     if (!Burst)
     {
         //game.spriteBatch.Draw(CloudTexture, CloudPosition, Color.White);
         Matrix world = Matrix.CreateTranslation(CloudPosition);
         game.DrawModel(model, world, game.view, game.projection);
     }
 }
Example #9
0
            public void Update(CloudGame game)
            {
                if (Burst) return;

                CloudPosition += CloudSpeed;

                if (CloudPosition.X > game.GraphicsDevice.Viewport.Width)
                {
                    CloudPosition.X = -CloudTexture.Width;
                    CloudPosition.Y = rand.Next(game.GraphicsDevice.Viewport.Height - CloudTexture.Height);
                }

                if (CloudContains(game.PinVector))
                {
                    CloudPopSound.Play();
                    Burst = true;
                    return;
                }
            }
Example #10
0
 public void Draw(CloudGame game)
 {
     if (!Burst)
         game.spriteBatch.Draw(CloudTexture, CloudPosition, Color.White);
 }