diff options
author | MW | 2007-03-02 18:12:54 +0000 |
---|---|---|
committer | MW | 2007-03-02 18:12:54 +0000 |
commit | 40a52b0f55828bfa564e1b044aa99ebff76a2b7e (patch) | |
tree | 3d1bd27c45609e71f4450e99bba5984e06c00bb2 /src/world/Entity.cs | |
parent | * Bind to IPAddress.Any instead of a hardcoded address (diff) | |
download | opensim-SC_OLD-40a52b0f55828bfa564e1b044aa99ebff76a2b7e.zip opensim-SC_OLD-40a52b0f55828bfa564e1b044aa99ebff76a2b7e.tar.gz opensim-SC_OLD-40a52b0f55828bfa564e1b044aa99ebff76a2b7e.tar.bz2 opensim-SC_OLD-40a52b0f55828bfa564e1b044aa99ebff76a2b7e.tar.xz |
A example of how the physics plugins might work
Diffstat (limited to 'src/world/Entity.cs')
-rw-r--r-- | src/world/Entity.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/world/Entity.cs b/src/world/Entity.cs index ab07fd6..72e4e83 100644 --- a/src/world/Entity.cs +++ b/src/world/Entity.cs | |||
@@ -9,9 +9,9 @@ namespace OpenSim.world | |||
9 | public class Entity | 9 | public class Entity |
10 | { | 10 | { |
11 | protected libsecondlife.LLUUID uuid; | 11 | protected libsecondlife.LLUUID uuid; |
12 | protected Vector3 position; | 12 | public Vector3 position; |
13 | protected Vector3 velocity; | 13 | public Vector3 velocity; |
14 | protected Quaternion rotation; | 14 | public Quaternion rotation; |
15 | protected string name; | 15 | protected string name; |
16 | protected List<Entity> children; | 16 | protected List<Entity> children; |
17 | 17 | ||
@@ -24,7 +24,13 @@ namespace OpenSim.world | |||
24 | name = "(basic entity)"; | 24 | name = "(basic entity)"; |
25 | children = new List<Entity>(); | 25 | children = new List<Entity>(); |
26 | } | 26 | } |
27 | 27 | public virtual void addFroces() | |
28 | { | ||
29 | foreach (Entity child in children) | ||
30 | { | ||
31 | child.addFroces(); | ||
32 | } | ||
33 | } | ||
28 | public virtual void update() { | 34 | public virtual void update() { |
29 | // Do any per-frame updates needed that are applicable to every type of entity | 35 | // Do any per-frame updates needed that are applicable to every type of entity |
30 | foreach (Entity child in children) | 36 | foreach (Entity child in children) |