Esempio n. 1
0
        public LunarVehicle GetLunarLander(Vector3 pos, Vector3 size, Matrix orient, Model model)
        {
            //Box boxPrimitive = new Box(-.5f * size, orient, size); // this is relative to the Body!
            LunarVehicle lander = new LunarVehicle(
                pos,
                size,
                orient,
                model,
                0
                );

            //newObjects.Add(lander.ID, lander);
            return lander;
        }
Esempio n. 2
0
        private Gobject CreateLunarLander()
        {
            Vector3 scale = new Vector3(2, 2, 2);
            LunarVehicle lander = new LunarVehicle(
                Vector3.Zero,
                scale,
                Matrix.Identity,
                landerModel,
                0
                );

            return lander;
        }
Esempio n. 3
0
 /// <summary>
 /// CLIENT SIDE
 /// client should do something oriented to the specific game here, like player bullets or cars.
 /// The server has granted the object request and this is where we handle the response it has sent back to the client
 /// This is called from the Network code, thus in the Network threads
 /// </summary>
 /// <param name="objectid"></param>
 /// <param name="asset"></param>
 public override void ProcessObjectAdded(int ownerid, int objectid, int asset)
 {
     Gobject newobject = assetManager.GetNewInstance((AssetTypes)asset);
     newobject.ID = objectid;
     physicsManager.AddNewObject(newobject);
     if (ownerid == MyClientID) // Only select the new car if its OUR new car
     {
         if (newobject is LunarVehicle)
         {
             lander = (LunarVehicle)newobject;
             SelectGameObject(lander);
         }
     }
 }