Directories.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //-----------------------------------------------------------------------------
  2. // Directories.cs
  3. //
  4. // Microsoft XNA Community Game Platform
  5. // Copyright (C) Microsoft Corporation. All rights reserved.
  6. //-----------------------------------------------------------------------------
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Text;
  10. using System.IO;
  11. namespace RacingGame.Helpers
  12. {
  13. /// <summary>
  14. /// Helper class which stores all used directories.
  15. /// </summary>
  16. class Directories
  17. {
  18. /// <summary>
  19. /// We can use this to relocate the whole game directory to another
  20. /// location. Used for testing (everything is stored on a network drive).
  21. /// </summary>
  22. public static readonly string GameBaseDirectory =
  23. // Update to support Xbox360:
  24. "";
  25. /// <summary>
  26. /// Content directory for all our textures, models and shaders.
  27. /// </summary>
  28. /// <returns>String</returns>
  29. public static string ContentDirectory
  30. {
  31. get
  32. {
  33. return "Content";// Path.Combine(GameBaseDirectory, "Content");
  34. }
  35. }
  36. /// <summary>
  37. /// Sounds directory, for some reason XAct projects don't produce
  38. /// any content files (bug?). We just load them ourself!
  39. /// </summary>
  40. /// <returns>String</returns>
  41. public static string SoundsDirectory
  42. {
  43. get
  44. {
  45. return Path.Combine(ContentDirectory, "Audio");
  46. }
  47. }
  48. /// <summary>
  49. /// Default Screenshots directory.
  50. /// </summary>
  51. /// <returns>String</returns>
  52. public static string ScreenshotsDirectory
  53. {
  54. get
  55. {
  56. return Path.Combine(GameBaseDirectory, "Screenshots");
  57. }
  58. }
  59. /// <summary>
  60. /// Private constructor to prevent instantiation.
  61. /// </summary>
  62. private Directories()
  63. {
  64. }
  65. }
  66. }