diff options
author | lbsa71 | 2007-07-18 09:36:47 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-18 09:36:47 +0000 |
commit | f70ec1fa75ef526266ad359d2db0e25f2635c182 (patch) | |
tree | 0ce6f6df1702d849532d1818c76c2bd301fb4579 /OpenSim/Region/Examples/SimpleApp/Program.cs | |
parent | * One hopefully-final attempt at fixing this remoting issue. (diff) | |
download | opensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.zip opensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.gz opensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.bz2 opensim-SC-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.xz |
* Added a FileSystemObject to SimpleApp
* Added Some ShapeTypes (shapes doesn't work though!)
* Fixed some \0 issues
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/Program.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/Program.cs | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 4dae461..82dba0e 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -17,6 +17,7 @@ using System.Timers; | |||
17 | using OpenSim.Region.Environment.Scenes; | 17 | using OpenSim.Region.Environment.Scenes; |
18 | using OpenSim.Framework.Data; | 18 | using OpenSim.Framework.Data; |
19 | using OpenSim.Region.Environment; | 19 | using OpenSim.Region.Environment; |
20 | using System.IO; | ||
20 | 21 | ||
21 | namespace SimpleApp | 22 | namespace SimpleApp |
22 | { | 23 | { |
@@ -58,16 +59,35 @@ namespace SimpleApp | |||
58 | 59 | ||
59 | udpServer.ServerListener(); | 60 | udpServer.ServerListener(); |
60 | 61 | ||
61 | PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox(); | 62 | PrimitiveBaseShape shape = BoxShape.Default; |
62 | shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); | 63 | shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); |
63 | LLVector3 pos = new LLVector3(138, 129, 27); | 64 | LLVector3 pos = new LLVector3(138, 129, 27); |
64 | 65 | ||
65 | SceneObject m_sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape); | 66 | SceneObject sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape); |
66 | scene.AddEntity(m_sceneObject); | 67 | scene.AddEntity(sceneObject); |
67 | 68 | ||
68 | MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager ); | 69 | MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager ); |
69 | scene.AddNewClient(m_character, false); | 70 | scene.AddNewClient(m_character, false); |
70 | 71 | ||
72 | DirectoryInfo dirInfo = new DirectoryInfo( "." ); | ||
73 | |||
74 | float x = 0; | ||
75 | float z = 0; | ||
76 | |||
77 | foreach( FileInfo fileInfo in dirInfo.GetFiles()) | ||
78 | { | ||
79 | LLVector3 filePos = new LLVector3(100 + x, 129, 27 + z); | ||
80 | x = x + 2; | ||
81 | if( x > 50 ) | ||
82 | { | ||
83 | x = 0; | ||
84 | z = z + 2; | ||
85 | } | ||
86 | |||
87 | FileSystemObject fileObject = new FileSystemObject( scene, fileInfo, filePos ); | ||
88 | scene.AddEntity(fileObject); | ||
89 | } | ||
90 | |||
71 | m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit."); | 91 | m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit."); |
72 | m_log.ReadLine(); | 92 | m_log.ReadLine(); |
73 | } | 93 | } |