From 94af93874226bf4441a35bfd4cf498e9ed83ccf5 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 15 Aug 2007 21:24:25 +0000 Subject: The 'Party Party Groupie Groupie Life is a game' commit: * Added prototypical MoneyBalance support * Finalized konceptual touch wiring * Turned SimpleApp into a tedious harvesting game. --- OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'OpenSim/Region/Examples/SimpleApp/ComplexObject.cs') diff --git a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs index b1da33a..5821b9f 100644 --- a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs @@ -5,6 +5,7 @@ using OpenSim.Region.Environment.Scenes; using Axiom.Math; using libsecondlife; using OpenSim.Framework.Types; +using OpenSim.Framework.Interfaces; namespace SimpleApp { @@ -35,6 +36,8 @@ namespace SimpleApp base.UpdateMovement(); } + + public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) { @@ -51,5 +54,25 @@ namespace SimpleApp UpdateParentIDs(); } + + public override void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) + { + m_parts.Remove(part.UUID); + remoteClient.SendKillObject(m_regionHandle, part.LocalID); + remoteClient.AddMoney(1); + remoteClient.SendChatMessage("Poof!", 1, Pos, "Party Party", LLUUID.Zero); + } + + public override void OnGrabGroup( LLVector3 offsetPos, IClientAPI remoteClient) + { + if( m_parts.Count == 1 ) + { + m_parts.Remove(m_rootPart.UUID); + m_scene.RemoveEntity(this); + remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalID); + remoteClient.AddMoney(50); + remoteClient.SendChatMessage("KABLAM!!!", 1, Pos, "Groupie Groupie", LLUUID.Zero); + } + } } } -- cgit v1.1