aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneEvents.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneEvents.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
new file mode 100644
index 0000000..9e383c6
--- /dev/null
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -0,0 +1,50 @@
1using libsecondlife;
2
3namespace OpenSim.Region.Environment.Scenes
4{
5 /// <summary>
6 /// A class for triggering remote scene events.
7 /// </summary>
8 public class EventManager
9 {
10 public delegate void OnFrameDelegate();
11 public event OnFrameDelegate OnFrame;
12
13 public delegate void OnNewPresenceDelegate(ScenePresence presence);
14 public event OnNewPresenceDelegate OnNewPresence;
15
16 public delegate void OnNewPrimitiveDelegate(PrimitiveOld prim);
17 public event OnNewPrimitiveDelegate OnNewPrimitive;
18
19 public delegate void OnRemovePresenceDelegate(LLUUID uuid);
20 public event OnRemovePresenceDelegate OnRemovePresence;
21
22 public void TriggerOnFrame()
23 {
24 if (OnFrame != null)
25 {
26 OnFrame();
27 }
28 }
29
30 public void TriggerOnNewPrimitive(PrimitiveOld prim)
31 {
32 if (OnNewPrimitive != null)
33 OnNewPrimitive(prim);
34 }
35
36 public void TriggerOnNewPresence(ScenePresence presence)
37 {
38 if (OnNewPresence != null)
39 OnNewPresence(presence);
40 }
41
42 public void TriggerOnRemovePresence(LLUUID uuid)
43 {
44 if (OnRemovePresence != null)
45 {
46 OnRemovePresence(uuid);
47 }
48 }
49 }
50}