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