ShakeManager.cs 626 B

12345678910111213141516171819202122232425262728293031
  1. using UnityEngine;
  2. namespace HQFPSWeapons
  3. {
  4. public static class ShakeManager
  5. {
  6. public static Message<ShakeEventData> ShakeEvent = new Message<ShakeEventData>();
  7. }
  8. public struct ShakeEventData
  9. {
  10. public Vector3 Position { get; private set; }
  11. public float Radius { get; private set; }
  12. public float Scale { get; private set; }
  13. public ShakeType ShakeType { get; private set; }
  14. public ShakeEventData(Vector3 position, float radius, float scale, ShakeType shakeType)
  15. {
  16. Position = position;
  17. Radius = radius;
  18. Scale = scale;
  19. ShakeType = shakeType;
  20. }
  21. }
  22. public enum ShakeType
  23. {
  24. Explosion
  25. }
  26. }