diff options
author | Tedd Hansen | 2007-08-08 14:05:13 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-08 14:05:13 +0000 |
commit | 2a0e157985d790e6cbd83d61690da2709dfab9dd (patch) | |
tree | e9c38c11773796111fb4ff222429605bdd76fd5e /OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs | |
parent | * Got SimpleApp working again (diff) | |
download | opensim-SC_OLD-2a0e157985d790e6cbd83d61690da2709dfab9dd.zip opensim-SC_OLD-2a0e157985d790e6cbd83d61690da2709dfab9dd.tar.gz opensim-SC_OLD-2a0e157985d790e6cbd83d61690da2709dfab9dd.tar.bz2 opensim-SC_OLD-2a0e157985d790e6cbd83d61690da2709dfab9dd.tar.xz |
Added ScriptEngine.DotNetEngine
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs new file mode 100644 index 0000000..46b898a --- /dev/null +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | /* Original code: Tedd Hansen */ | ||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | |||
33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it. | ||
37 | /// </summary> | ||
38 | class EventManager | ||
39 | { | ||
40 | private ScriptEngine myScriptEngine; | ||
41 | public EventManager(ScriptEngine _ScriptEngine) | ||
42 | { | ||
43 | myScriptEngine = _ScriptEngine; | ||
44 | // TODO: HOOK EVENTS UP TO SERVER! | ||
45 | Common.SendToDebug("EventManager Start"); | ||
46 | |||
47 | // Hook up a test event to our test form | ||
48 | Common.SendToDebug("EventManager Hooking up dummy-event: touch_start"); | ||
49 | myScriptEngine.World.touch_start += new TempWorldInterfaceEventDelegates.touch_start(touch_start); | ||
50 | } | ||
51 | |||
52 | public void touch_start(string ObjectID) | ||
53 | { | ||
54 | // Add to queue for all scripts in ObjectID object | ||
55 | Common.SendToDebug("EventManager Event: touch_start"); | ||
56 | myScriptEngine.myEventQueueManager.AddToObjectQueue(ObjectID, "touch_start", new object[] { (UInt32)0 }); | ||
57 | } | ||
58 | |||
59 | |||
60 | // TODO: Replace placeholders below | ||
61 | // These needs to be hooked up to OpenSim during init of this class | ||
62 | // then queued in EventQueueManager. | ||
63 | // When queued in EventQueueManager they need to be LSL compatible (name and params) | ||
64 | public void state_entry() { } | ||
65 | public void state_exit() { } | ||
66 | //public void touch_start() { } | ||
67 | public void touch() { } | ||
68 | public void touch_end() { } | ||
69 | public void collision_start() { } | ||
70 | public void collision() { } | ||
71 | public void collision_end() { } | ||
72 | public void land_collision_start() { } | ||
73 | public void land_collision() { } | ||
74 | public void land_collision_end() { } | ||
75 | public void timer() { } | ||
76 | public void listen() { } | ||
77 | public void on_rez() { } | ||
78 | public void sensor() { } | ||
79 | public void no_sensor() { } | ||
80 | public void control() { } | ||
81 | public void money() { } | ||
82 | public void email() { } | ||
83 | public void at_target() { } | ||
84 | public void not_at_target() { } | ||
85 | public void at_rot_target() { } | ||
86 | public void not_at_rot_target() { } | ||
87 | public void run_time_permissions() { } | ||
88 | public void changed() { } | ||
89 | public void attach() { } | ||
90 | public void dataserver() { } | ||
91 | public void link_message() { } | ||
92 | public void moving_start() { } | ||
93 | public void moving_end() { } | ||
94 | public void object_rez() { } | ||
95 | public void remote_data() { } | ||
96 | public void http_response() { } | ||
97 | |||
98 | } | ||
99 | } | ||