Hijacked simpleApp again (sorry lbsa71, guess I should create my own simpleApp), to try out a basic test npc character(/class).

This commit is contained in:
MW
2007-07-15 21:10:05 +00:00
parent 6510aea0ed
commit bf2f3ea29a
7 changed files with 350 additions and 15 deletions

View File

@@ -47,14 +47,15 @@ namespace SimpleApp
LLVector3 pos = new LLVector3(128, 128, 128);
client.OnRegionHandShakeReply += SendLayerData;
client.OnChatFromViewer +=
/*client.OnChatFromViewer +=
delegate(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
{
// Echo it (so you know what you typed)
client.SendChatMessage(message, type, fromPos, fromName, fromAgentID);
client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero );
};
*/
client.OnChatFromViewer += this.SimChat;
client.OnAddPrim += AddNewPrim;
client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
client.OnRequestMapBlocks += this.RequestMapBlocks;
@@ -70,9 +71,27 @@ namespace SimpleApp
client.SendRegionHandshake(m_regInfo);
ScenePresence avatar = CreateAndAddScenePresence(client);
avatar.Pos = new LLVector3(128, 128, 26);
avatar.Pos = new LLVector3(128, 128, 26);
}
public override void Update()
{
foreach (LLUUID UUID in Entities.Keys)
{
Entities[UUID].updateMovement();
}
lock (this.m_syncRoot)
{
this.phyScene.Simulate(timeStep);
}
foreach (LLUUID UUID in Entities.Keys)
{
Entities[UUID].update();
}
}
#endregion
}
}