Ejemplo n.º 1
0
        public LunarVehicle GetLunarLander(Vector3 pos, Matrix orient)
        {
            LunarVehicle lander = assetManager.GetNewInstance(AssetTypes.Lander) as LunarVehicle;

            lander.Position    = pos;
            lander.Orientation = orient;
            return(lander);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
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 / 2,
                boxPrimitive,
                model,
                "cube"
                );

            //newObjects.Add(lander.ID, lander);
            return(lander);
        }
Ejemplo n.º 4
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);
                }
            }
        }