aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Script_manager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Script_manager.cs')
-rw-r--r--Script_manager.cs89
1 files changed, 89 insertions, 0 deletions
diff --git a/Script_manager.cs b/Script_manager.cs
new file mode 100644
index 0000000..87f2eca
--- /dev/null
+++ b/Script_manager.cs
@@ -0,0 +1,89 @@
1/*
2 * Copyright (c) 2007 Michael Wright
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 */
30
31using System;
32using System.Collections;
33//using LuaInterface;
34using libsecondlife;
35
36namespace Second_server
37{
38 /// <summary>
39 /// Description of Script_manager.
40 /// </summary>
41 public class Script_manager
42 {
43 //public LuaInterface.Lua Lu;
44 //private ArrayList scripts;
45 //private prim_info current_prim;
46
47 public Script_manager()
48 {
49 }
50
51 /*public void start_up (Lua lua, App ap)
52 {
53 this.Lu=lua;
54 //register any lua routines , like check finish script one
55 Lu.OpenMathLib();
56 }*/
57 public void script_register( script_object_interface script)
58 {
59 //called by scripts to register themselves
60 }
61
62 public void Call_tick(prim_info prim)
63 {
64 //set current prim and then call tick function in linked script
65 }
66 public void Call_click(prim_info prim)
67 {
68 //set current prim and then call clicked function in linked script
69
70 }
71 private void Register_functions()
72 {
73 //lu.RegisterFunction( "register_script",this,this.GetType().GetMethod("script_register"));
74 //lu.RegisterFunction( "Move_object",this,this.GetType().GetMethod("Move_object"));
75
76 }
77 //Lua registered functions
78 public void Move_object(float x ,float y, float z)
79 {
80
81 }
82 }
83
84 public interface script_object_interface
85 {
86 void Frame_tick();
87 void clicked();
88 }
89}