ObjectPlacementPathHeightPatternMessages.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #if UNITY_EDITOR
  2. using UnityEngine;
  3. namespace O3DWB
  4. {
  5. public class ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage : Message
  6. {
  7. #region Private Variables
  8. private ObjectPlacementPathHeightPattern _removedPattern;
  9. #endregion
  10. #region Public Properties
  11. public ObjectPlacementPathHeightPattern RemovedPattern { get { return _removedPattern; } }
  12. #endregion
  13. #region Constructors
  14. public ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage(ObjectPlacementPathHeightPattern removedPattern)
  15. : base(MessageType.ObjectPlacementPathHeightPatternWasRemovedFromDatabase)
  16. {
  17. _removedPattern = removedPattern;
  18. }
  19. #endregion
  20. #region Public Static Functions
  21. public static void SendToInterestedListeners(ObjectPlacementPathHeightPattern removedPattern)
  22. {
  23. var message = new ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage(removedPattern);
  24. MessageListenerDatabase.Instance.SendMessageToInterestedListeners(message);
  25. }
  26. #endregion
  27. }
  28. public class NewObjectPlacementPathHeightPatternWasActivatedMessage : Message
  29. {
  30. #region Private Variables
  31. private ObjectPlacementPathHeightPattern _newActivePattern;
  32. #endregion
  33. #region Public Properties
  34. public ObjectPlacementPathHeightPattern NewActivePattern { get { return _newActivePattern; } }
  35. #endregion
  36. #region Constructors
  37. public NewObjectPlacementPathHeightPatternWasActivatedMessage(ObjectPlacementPathHeightPattern newActivePattern)
  38. : base(MessageType.NewObjectPlacementPathHeightPatternWasActivated)
  39. {
  40. _newActivePattern = newActivePattern;
  41. }
  42. #endregion
  43. #region Public Static Functions
  44. public static void SendToInterestedListeners(ObjectPlacementPathHeightPattern newActivePattern)
  45. {
  46. var message = new NewObjectPlacementPathHeightPatternWasActivatedMessage(newActivePattern);
  47. MessageListenerDatabase.Instance.SendMessageToInterestedListeners(message);
  48. }
  49. #endregion
  50. }
  51. }
  52. #endif