GameSkybox.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // GameSkybox.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 System;
  11. using System.Collections.Generic;
  12. using System.Text;
  13. using Microsoft.Xna.Framework;
  14. using Microsoft.Xna.Framework.Content;
  15. using Microsoft.Xna.Framework.Graphics;
  16. using RobotGameData.Render;
  17. using RobotGameData.Resource;
  18. #endregion
  19. namespace RobotGameData.GameObject
  20. {
  21. /// <summary>
  22. /// this model class processes Skybox.
  23. /// When the basis position gets specified, it gets drawn on the specified position.
  24. /// </summary>
  25. public class GameSkybox : GameModel
  26. {
  27. #region Fields
  28. bool followOwner = false;
  29. #endregion
  30. #region Properties
  31. public bool FollowOwner
  32. {
  33. get { return followOwner; }
  34. set { followOwner = value; }
  35. }
  36. #endregion
  37. /// <summary>
  38. /// Constructor.
  39. /// </summary>
  40. /// <param name="resource">model resource</param>
  41. public GameSkybox(GameResourceModel resource)
  42. : base(resource) {}
  43. /// <summary>
  44. /// Constructor.
  45. /// </summary>
  46. /// <param name="fileName">model file name</param>
  47. public GameSkybox(string fileName)
  48. : base(fileName) {}
  49. public override void Initialize()
  50. {
  51. base.Initialize();
  52. }
  53. protected override void OnUpdate(GameTime gameTime)
  54. {
  55. base.OnUpdate(gameTime);
  56. }
  57. protected override void OnDraw(RenderTracer renderTracer)
  58. {
  59. base.OnDraw(renderTracer);
  60. }
  61. /// <summary>
  62. /// gets moved to the specified position.
  63. /// </summary>
  64. /// <param name="position">follow position</param>
  65. public void SetBasisPosition(Vector3 position)
  66. {
  67. // The sky follows this position
  68. this.Position = position;
  69. }
  70. }
  71. }