diff options
Switched in NameSpaceChanges
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneEvents.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneEvents.cs | 52 |
1 files changed, 52 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..fa1bacb --- /dev/null +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs | |||
@@ -0,0 +1,52 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Region.Environment.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 | } | ||