From 5a909a2054b17c74e23d608a401c0779a3072869 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 14 Jul 2007 14:48:36 +0000 Subject: Set up parcel manager and the master avatar in SimpleApp. --- OpenSim/Region/Examples/SimpleApp/PulseScript.cs | 68 ++++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'OpenSim/Region/Examples/SimpleApp/PulseScript.cs') diff --git a/OpenSim/Region/Examples/SimpleApp/PulseScript.cs b/OpenSim/Region/Examples/SimpleApp/PulseScript.cs index 01a9bda..b65765c 100644 --- a/OpenSim/Region/Examples/SimpleApp/PulseScript.cs +++ b/OpenSim/Region/Examples/SimpleApp/PulseScript.cs @@ -5,48 +5,48 @@ using OpenSim.Region.Scripting; using OpenSim.Region.Environment.Scenes; namespace SimpleApp { - public class PulseScript :IScript + public class PulseScript : IScript { - ScriptInfo script; + ScriptInfo script; private libsecondlife.LLVector3 pulse = new libsecondlife.LLVector3(0.1f, 0.1f, 0.1f); - public string getName() - { - return "pulseScript 0.1"; - } + public string getName() + { + return "pulseScript 0.1"; + } - public void Initialise(ScriptInfo scriptInfo) - { - script = scriptInfo; - script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame); - script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); - } + public void Initialise(ScriptInfo scriptInfo) + { + script = scriptInfo; + script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame); + script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); + } - void events_OnNewPresence(ScenePresence presence) - { - script.logger.Verbose("Hello " + presence.firstname.ToString() + "!"); - } + void events_OnNewPresence(ScenePresence presence) + { + script.logger.Verbose("Hello " + presence.firstname.ToString() + "!"); + } - void events_OnFrame() + void events_OnFrame() + { + foreach (EntityBase ent in this.script.world.Entities.Values) { - foreach(EntityBase ent in this.script.world.Entities.Values) - { - if (ent is SceneObject) - { - SceneObject prim = (SceneObject)ent; - if ((prim.rootPrimitive.Scale.X > 1) && (prim.rootPrimitive.Scale.Y > 1) && (prim.rootPrimitive.Scale.Z > 1)) - { - this.pulse = new libsecondlife.LLVector3(-0.1f, -0.1f, -0.1f); - } - else if ((prim.rootPrimitive.Scale.X < 0.2f) && (prim.rootPrimitive.Scale.Y < 0.2f) && (prim.rootPrimitive.Scale.Z < 0.2f)) - { - pulse = new libsecondlife.LLVector3(0.1f, 0.1f, 0.1f); - } + if (ent is SceneObject) + { + SceneObject prim = (SceneObject)ent; + if ((prim.rootPrimitive.Scale.X > 1) && (prim.rootPrimitive.Scale.Y > 1) && (prim.rootPrimitive.Scale.Z > 1)) + { + this.pulse = new libsecondlife.LLVector3(-0.1f, -0.1f, -0.1f); + } + else if ((prim.rootPrimitive.Scale.X < 0.2f) && (prim.rootPrimitive.Scale.Y < 0.2f) && (prim.rootPrimitive.Scale.Z < 0.2f)) + { + pulse = new libsecondlife.LLVector3(0.1f, 0.1f, 0.1f); + } - prim.rootPrimitive.ResizeGoup( prim.rootPrimitive.Scale + pulse); - } - } + prim.rootPrimitive.ResizeGoup(prim.rootPrimitive.Scale + pulse); + } } - + } + } } -- cgit v1.1