diff options
author | lbsa71 | 2007-07-17 17:47:23 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-17 17:47:23 +0000 |
commit | d95918f2288967de3937ec7aa648a5303eba4027 (patch) | |
tree | 7eeb692e0939d566da2e246a7077b8fcc68ec1b3 /OpenSim/Region/Examples/SimpleApp/MySceneObject.cs | |
parent | * Added "backup" console command for sdague (diff) | |
download | opensim-SC_OLD-d95918f2288967de3937ec7aa648a5303eba4027.zip opensim-SC_OLD-d95918f2288967de3937ec7aa648a5303eba4027.tar.gz opensim-SC_OLD-d95918f2288967de3937ec7aa648a5303eba4027.tar.bz2 opensim-SC_OLD-d95918f2288967de3937ec7aa648a5303eba4027.tar.xz |
* Changed SimpleApp to use EventManager and Scene timer
* Refactored a lot of m_* and public -> wrappers
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MySceneObject.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs index f5c6a0f..3828b9d 100644 --- a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs | |||
@@ -21,20 +21,15 @@ namespace SimpleApp | |||
21 | String instanceName = "_Total"; | 21 | String instanceName = "_Total"; |
22 | 22 | ||
23 | m_counter = new PerformanceCounter(objectName, counterName, instanceName); | 23 | m_counter = new PerformanceCounter(objectName, counterName, instanceName); |
24 | |||
25 | Timer timer = new Timer(); | ||
26 | timer.Enabled = true; | ||
27 | timer.Interval = 100; | ||
28 | timer.Elapsed += new ElapsedEventHandler(this.Heartbeat); | ||
29 | |||
30 | } | 24 | } |
31 | 25 | ||
32 | public void Heartbeat(object sender, EventArgs e) | 26 | public override void Update( ) |
33 | { | 27 | { |
34 | float cpu = m_counter.NextValue() / 40f; | 28 | float cpu = m_counter.NextValue() / 40f; |
35 | LLVector3 size = new LLVector3(cpu, cpu, cpu); | 29 | LLVector3 size = new LLVector3(cpu, cpu, cpu); |
36 | rootPrimitive.ResizeGoup( size ); | 30 | rootPrimitive.ResizeGoup( size ); |
37 | update(); | 31 | |
32 | base.Update(); | ||
38 | } | 33 | } |
39 | } | 34 | } |
40 | } | 35 | } |