Example #1
0
        private void SetNewProjectilePositions()
        {
            LevelProgression levelProgression = GetLevelProgression();

            foreach (Projectile projectile in levelAttempt.Level.Projectiles)
            {
                Vector2 movementDelta;

                if (levelProgression.IsProjectileDeflected(projectile))
                {
                    movementDelta = levelProgression.GetProjectileDeflectionDirection(projectile) / GeneralValues.FPS;
                }
                else
                {
                    movementDelta = new Vector2(-PhysicsValues.GetProjectileVelocityPerFrame(), 0);
                }

                levelProgression.MoveProjectile(projectile, movementDelta);
            }
        }