diff options
author | lbsa71 | 2007-08-15 21:24:25 +0000 |
---|---|---|
committer | lbsa71 | 2007-08-15 21:24:25 +0000 |
commit | 94af93874226bf4441a35bfd4cf498e9ed83ccf5 (patch) | |
tree | 4fd6498ca8384f375bfc1365e74469af13954ae0 /OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | |
parent | compile error removed :) (diff) | |
download | opensim-SC-94af93874226bf4441a35bfd4cf498e9ed83ccf5.zip opensim-SC-94af93874226bf4441a35bfd4cf498e9ed83ccf5.tar.gz opensim-SC-94af93874226bf4441a35bfd4cf498e9ed83ccf5.tar.bz2 opensim-SC-94af93874226bf4441a35bfd4cf498e9ed83ccf5.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/ComplexObject.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | 23 |
1 files changed, 23 insertions, 0 deletions
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; | |||
5 | using Axiom.Math; | 5 | using Axiom.Math; |
6 | using libsecondlife; | 6 | using libsecondlife; |
7 | using OpenSim.Framework.Types; | 7 | using OpenSim.Framework.Types; |
8 | using OpenSim.Framework.Interfaces; | ||
8 | 9 | ||
9 | namespace SimpleApp | 10 | namespace SimpleApp |
10 | { | 11 | { |
@@ -35,6 +36,8 @@ namespace SimpleApp | |||
35 | base.UpdateMovement(); | 36 | base.UpdateMovement(); |
36 | } | 37 | } |
37 | 38 | ||
39 | |||
40 | |||
38 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) | 41 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) |
39 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) | 42 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) |
40 | { | 43 | { |
@@ -51,5 +54,25 @@ namespace SimpleApp | |||
51 | 54 | ||
52 | UpdateParentIDs(); | 55 | UpdateParentIDs(); |
53 | } | 56 | } |
57 | |||
58 | public override void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) | ||
59 | { | ||
60 | m_parts.Remove(part.UUID); | ||
61 | remoteClient.SendKillObject(m_regionHandle, part.LocalID); | ||
62 | remoteClient.AddMoney(1); | ||
63 | remoteClient.SendChatMessage("Poof!", 1, Pos, "Party Party", LLUUID.Zero); | ||
64 | } | ||
65 | |||
66 | public override void OnGrabGroup( LLVector3 offsetPos, IClientAPI remoteClient) | ||
67 | { | ||
68 | if( m_parts.Count == 1 ) | ||
69 | { | ||
70 | m_parts.Remove(m_rootPart.UUID); | ||
71 | m_scene.RemoveEntity(this); | ||
72 | remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalID); | ||
73 | remoteClient.AddMoney(50); | ||
74 | remoteClient.SendChatMessage("KABLAM!!!", 1, Pos, "Groupie Groupie", LLUUID.Zero); | ||
75 | } | ||
76 | } | ||
54 | } | 77 | } |
55 | } | 78 | } |