aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs16
1 files changed, 4 insertions, 12 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index af70f07..f7bf5d6 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -12,6 +12,7 @@ using OpenSim.Framework.Interfaces;
12using OpenSim.Framework.Types; 12using OpenSim.Framework.Types;
13using OpenSim.Framework.Data; 13using OpenSim.Framework.Data;
14using OpenSim.Framework.Utilities; 14using OpenSim.Framework.Utilities;
15using OpenSim.Region.Environment.Scenes;
15 16
16namespace SimpleApp 17namespace SimpleApp
17{ 18{
@@ -78,9 +79,9 @@ namespace SimpleApp
78#pragma warning restore 67 79#pragma warning restore 67
79 80
80 private LLUUID myID = LLUUID.Random(); 81 private LLUUID myID = LLUUID.Random();
81 public MyNpcCharacter() 82 public MyNpcCharacter( EventManager eventManager )
82 { 83 {
83 84 eventManager.OnFrame += Update;
84 } 85 }
85 86
86 public virtual LLVector3 StartPos 87 public virtual LLVector3 StartPos
@@ -143,18 +144,9 @@ namespace SimpleApp
143 { 144 {
144 this.OnRegionHandShakeReply(this); 145 this.OnRegionHandShakeReply(this);
145 this.OnCompleteMovementToRegion(); 146 this.OnCompleteMovementToRegion();
146 this.StartMovement();
147 }
148
149 public void StartMovement()
150 {
151 Timer timer = new Timer();
152 timer.Enabled = true;
153 timer.Interval = 500;
154 timer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
155 } 147 }
156 148
157 public void Heartbeat(object sender, EventArgs e) 149 private void Update( )
158 { 150 {
159 Encoding enc = Encoding.ASCII; 151 Encoding enc = Encoding.ASCII;
160 152