From f1c03604c90eb4537a8ec6539cf462bfa8266218 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 27 Jun 2007 05:52:48 +0000 Subject: * Commiting new "SceneEvents" class - a single class which contains bindable events for common things, which can later be passed to the scripting engine. Events being things like OnFrame / OnNewViewer, etc. --- OpenSim/OpenSim.Region/Scenes/SceneEvents.cs | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 OpenSim/OpenSim.Region/Scenes/SceneEvents.cs (limited to 'OpenSim/OpenSim.Region') diff --git a/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs b/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs new file mode 100644 index 0000000..2b3348a --- /dev/null +++ b/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Region.Scenes +{ + /// + /// A class for triggering remote scene events. + /// + class SceneEvents + { + public delegate void OnFrameDelegate(); + public event OnFrameDelegate OnFrame; + + public delegate void OnNewViewerDelegate(); + public event OnNewViewerDelegate OnNewViewer; + + public delegate void OnNewPrimitiveDelegate(); + public event OnNewPrimitiveDelegate OnNewPrimitive; + + public void TriggerOnFrame() + { + if (OnFrame != null) + { + OnFrame(); + } + } + } +} -- cgit v1.1