X hits on this document

260 views

0 shares

0 downloads

0 comments

58 / 102

           }

           // TODO: Play animation

           // TODO: Fire at the appropriate animation frame

           postUpdateStateChange = currentState |

               CatapultState.ProjectileFlying;

           projectile.ProjectilePosition =

               projectile.ProjectileStartPosition;                    

           break;

case CatapultState.Firing | CatapultState.ProjectileFlying:

           // Progress Fire animation                    

           // TODO: Play animation

           // Update projectile velocity & position in flight

           projectile.UpdateProjectileFlightData(gameTime, wind, gravity,

               out isGroundHit);

           if (isGroundHit)

           {

               // Start hit sequence

postUpdateStateChange = CatapultState.ProjectileHit;

               // TODO: Play animation

           }

           break;

       case CatapultState.ProjectileFlying:

           // Update projectile velocity & position in flight

           projectile.UpdateProjectileFlightData(gameTime, wind, gravity,

               out isGroundHit);

           if (isGroundHit)

           {

               // Start hit sequence

postUpdateStateChange = CatapultState.ProjectileHit;

               // TODO: Play animation

           }

           break;

       case CatapultState.ProjectileHit:

           // Check hit on ground impact

           if (!CheckHit())

           {

if (lastUpdateState != CatapultState.ProjectileHit)

               {

Page | 58

Document info
Document views260
Page views260
Page last viewedWed Dec 07 15:33:06 UTC 2016
Pages102
Paragraphs3115
Words17333

Comments