Beispiel #1
0
        public Galaxy(GraphicsDevice pGraphicsDevice, SharedList pSharedList, ContentManager pContentManager, Camera pCamera, HeightMap heightMap)
        {
            _sharedList = pSharedList;

            /*_emiters.Add(new Emiter(new Vector3(50f, 100f, 50f), new Vector3(-0.5f, 0f, -0.5f), _sharedList));
             *
             * _emiters.Add(new Emiter(new Vector3(0f, 100f, 0f), new Vector3(1.0f, 5f, 1.0f), _sharedList));
             * _emiters.Add(new Emiter(new Vector3(100f, 100f, 0f), new Vector3(-1.0f, 5f, 1.0f), _sharedList));
             * _emiters.Add(new Emiter(new Vector3(0f, 100f, 100f), new Vector3(1.0f, 5f, -1.0f), _sharedList));
             * _emiters.Add(new Emiter(new Vector3(100f, 100f, 100f), new Vector3(-1.0f, 5f, -1.0f), _sharedList));
             *
             * _emiters.Add(new Emiter(new Vector3(-100f, 100f, -100f), new Vector3(1.0f, 5f, 1.0f), _sharedList));
             * _emiters.Add(new Emiter(new Vector3(-200f, 100f, -100f), new Vector3(1.0f, 5f, 1.0f), _sharedList));
             * _emiters.Add(new Emiter(new Vector3(-100f, 100f, -200f), new Vector3(1.0f, 5f, 1.0f), _sharedList));
             * _emiters.Add(new Emiter(new Vector3(-200f, 100f, -200f), new Vector3(1.0f, 5f, 1.0f), _sharedList));*/

            _emiters.Add(new LinearEmiter(new Vector3(-100f, 100f, -100f), new Vector3(1.0f, 5f, 1.0f), _sharedList));

            _camera         = pCamera;
            _graphicsDevice = pGraphicsDevice;
            _contentManager = pContentManager;

            _heightMap = heightMap;

            _drawEngine   = new DrawEngine(pGraphicsDevice, pContentManager, _sharedList);
            _physicEngine = new PhysicEngine(pGraphicsDevice, pContentManager, _sharedList, _heightMap);
        }
Beispiel #2
0
 public static SharedList getInstance(GraphicsDevice pGraphicsDevice)
 {
     if (instance == null)
     {
         instance = new SharedList(pGraphicsDevice);
     }
     return(instance);
 }
Beispiel #3
0
 public Emiter(Vector3 pos, Vector3 force, SharedList sharedlist)
 {
     this._pos        = pos;
     this._force      = force;
     this._sharedlist = sharedlist;
 }
Beispiel #4
0
 public Emiter(Vector3 pos, Vector3 force, SharedList sharedlist)
 {
     this._pos = pos;
     this._force = force;
     this._sharedlist = sharedlist;
 }