diff options
author | lbsa71 | 2007-07-14 15:33:25 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-14 15:33:25 +0000 |
commit | 811d2b69c9c5d07dbb196cd2ee6353916d0b51c5 (patch) | |
tree | ad6cb65aee221bdab5a0cd7deddb49950ba98241 /OpenSim/Region/Examples/SimpleApp/MySceneObject.cs | |
parent | *Added support for prim counting on parcels (diff) | |
download | opensim-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.cs | 40 |
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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Region.Environment.Scenes; | ||
5 | using libsecondlife; | ||
6 | using OpenSim.Framework.Types; | ||
7 | using System.Timers; | ||
8 | |||
9 | namespace 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 | } | ||