SceneEvents.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using libsecondlife;
  2. namespace OpenSim.Region.Environment.Scenes
  3. {
  4. /// <summary>
  5. /// A class for triggering remote scene events.
  6. /// </summary>
  7. public class EventManager
  8. {
  9. public delegate void OnFrameDelegate();
  10. public event OnFrameDelegate OnFrame;
  11. public delegate void OnNewPresenceDelegate(ScenePresence presence);
  12. public event OnNewPresenceDelegate OnNewPresence;
  13. public delegate void OnNewPrimitiveDelegate(PrimitiveOld prim);
  14. public event OnNewPrimitiveDelegate OnNewPrimitive;
  15. public delegate void OnRemovePresenceDelegate(LLUUID uuid);
  16. public event OnRemovePresenceDelegate OnRemovePresence;
  17. public void TriggerOnFrame()
  18. {
  19. if (OnFrame != null)
  20. {
  21. OnFrame();
  22. }
  23. }
  24. public void TriggerOnNewPrimitive(PrimitiveOld prim)
  25. {
  26. if (OnNewPrimitive != null)
  27. OnNewPrimitive(prim);
  28. }
  29. public void TriggerOnNewPresence(ScenePresence presence)
  30. {
  31. if (OnNewPresence != null)
  32. OnNewPresence(presence);
  33. }
  34. public void TriggerOnRemovePresence(LLUUID uuid)
  35. {
  36. if (OnRemovePresence != null)
  37. {
  38. OnRemovePresence(uuid);
  39. }
  40. }
  41. }
  42. }