aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/MySceneObject.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/MySceneObject.cs
parent*Added support for prim counting on parcels (diff)
downloadopensim-SC_OLD-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.zip
opensim-SC_OLD-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.gz
opensim-SC_OLD-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.bz2
opensim-SC_OLD-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 'OpenSim/Region/Examples/SimpleApp/MySceneObject.cs')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MySceneObject.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
new file mode 100644
index 0000000..8508dac
--- /dev/null
+++ b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
@@ -0,0 +1,40 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Region.Environment.Scenes;
5using libsecondlife;
6using OpenSim.Framework.Types;
7using System.Timers;
8
9namespace SimpleApp
10{
11 public class MySceneObject : SceneObject
12 {
13 LLVector3 delta = new LLVector3(0.1f, 0.1f, 0.1f);
14
15 public MySceneObject(Scene world, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
16 : base(world, ownerID, localID, pos, shape )
17 {
18 Timer timer = new Timer();
19 timer.Enabled = true;
20 timer.Interval = 100;
21 timer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
22 }
23
24 public void Heartbeat(object sender, EventArgs e)
25 {
26 if (rootPrimitive.Scale.X > 1)
27 {
28 delta = new LLVector3(-0.1f, -0.1f, -0.1f);
29 }
30
31 if (rootPrimitive.Scale.X < 0.2f)
32 {
33 delta = new LLVector3(0.1f, 0.1f, 0.1f);
34 }
35
36 rootPrimitive.ResizeGoup(rootPrimitive.Scale + delta);
37 update();
38 }
39 }
40}