aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/PulseScript.cs
diff options
context:
space:
mode:
authorlbsa712007-07-14 15:33:25 +0000
committerlbsa712007-07-14 15:33:25 +0000
commit811d2b69c9c5d07dbb196cd2ee6353916d0b51c5 (patch)
treead6cb65aee221bdab5a0cd7deddb49950ba98241 /OpenSim/Region/Examples/SimpleApp/PulseScript.cs
parent*Added support for prim counting on parcels (diff)
downloadopensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.zip
opensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.gz
opensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.bz2
opensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.xz
* Worked some more on SimpleApp
* Removed SceneObject references to RegionHandle, ParcelManager, EventManager as they are public on Scene * Moved PulseScript behaviour into MySceneObject
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/PulseScript.cs52
1 files changed, 0 insertions, 52 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/PulseScript.cs b/OpenSim/Region/Examples/SimpleApp/PulseScript.cs
deleted file mode 100644
index b65765c..0000000
--- a/OpenSim/Region/Examples/SimpleApp/PulseScript.cs
+++ /dev/null
@@ -1,52 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Region.Scripting;
5using OpenSim.Region.Environment.Scenes;
6namespace SimpleApp
7{
8 public class PulseScript : IScript
9 {
10 ScriptInfo script;
11
12 private libsecondlife.LLVector3 pulse = new libsecondlife.LLVector3(0.1f, 0.1f, 0.1f);
13 public string getName()
14 {
15 return "pulseScript 0.1";
16 }
17
18 public void Initialise(ScriptInfo scriptInfo)
19 {
20 script = scriptInfo;
21 script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame);
22 script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence);
23 }
24
25 void events_OnNewPresence(ScenePresence presence)
26 {
27 script.logger.Verbose("Hello " + presence.firstname.ToString() + "!");
28 }
29
30 void events_OnFrame()
31 {
32 foreach (EntityBase ent in this.script.world.Entities.Values)
33 {
34 if (ent is SceneObject)
35 {
36 SceneObject prim = (SceneObject)ent;
37 if ((prim.rootPrimitive.Scale.X > 1) && (prim.rootPrimitive.Scale.Y > 1) && (prim.rootPrimitive.Scale.Z > 1))
38 {
39 this.pulse = new libsecondlife.LLVector3(-0.1f, -0.1f, -0.1f);
40 }
41 else if ((prim.rootPrimitive.Scale.X < 0.2f) && (prim.rootPrimitive.Scale.Y < 0.2f) && (prim.rootPrimitive.Scale.Z < 0.2f))
42 {
43 pulse = new libsecondlife.LLVector3(0.1f, 0.1f, 0.1f);
44 }
45
46 prim.rootPrimitive.ResizeGoup(prim.rootPrimitive.Scale + pulse);
47 }
48 }
49 }
50
51 }
52}