WorkerBee.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // WorkerBee.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. #region Using Statements
  10. using Microsoft.Xna.Framework;
  11. using Microsoft.Xna.Framework.Graphics;
  12. #endregion
  13. namespace HoneycombRush
  14. {
  15. /// <summary>
  16. /// A component that represents a worker bee.
  17. /// </summary>
  18. public class WorkerBee : Bee
  19. {
  20. #region Properties
  21. protected override int MaxVelocity
  22. {
  23. get
  24. {
  25. var configuration = ConfigurationManager.ModesConfiguration[ConfigurationManager.DifficultyMode.Value];
  26. return (int)configuration.MaxWorkerBeeVelocity;
  27. }
  28. }
  29. protected override float AccelerationFactor
  30. {
  31. get
  32. {
  33. return 1.5f;
  34. }
  35. }
  36. #endregion
  37. #region Initialization
  38. /// <summary>
  39. /// Creates a new worker bee instance.
  40. /// </summary>
  41. /// <param name="game">The associated game object.</param>
  42. /// <param name="gamePlayScreen">The gameplay screen where the bee is displayed</param>
  43. /// <param name="beehive">The bee's associated beehive.</param>
  44. public WorkerBee(Game game, GameplayScreen gamePlayScreen, Beehive beehive)
  45. : base(game, gamePlayScreen, beehive)
  46. {
  47. AnimationKey = "WorkerBee";
  48. }
  49. protected override void LoadContent()
  50. {
  51. texture = Game.Content.Load<Texture2D>("Textures/beeWingFlap");
  52. base.LoadContent();
  53. }
  54. #endregion
  55. }
  56. }