public static void ServerInitialize(SmallShip smallShip, Vector2 position, Vector2 velocity, ControlState controller1, ControlState controller4)
        {
            Ship.ServerInitialize(smallShip, position, velocity, 0, 40, 800, 1800, 1f, controller1);
            Turret t3 = new Turret(smallShip.Game);
            Turret.ServerInitialize(t3, smallShip, new Vector2(25, 25) - TextureLoader.GetTexture("Enemy").CenterOfMass, (float)(0), (float)(Math.PI * 3), controller4);

            smallShip.Game.GameObjectCollection.Add(t3);
        }
Exemplo n.º 2
0
        public static void ServerInitialize(Turret obj, PhysicalObject parent, Vector2 position, float direction, float range, ControlState controller)
        {
            MemberPhysicalObject.ServerInitialize(obj, parent, position, direction);
            obj.Range = range;

            obj.controller = controller;

            Gun gun = new Gun(obj.Game);
            Gun.ServerInitialize(gun, obj, new Vector2(37, 0), 0);
            obj.Game.GameObjectCollection.Add(gun);
        }
Exemplo n.º 3
0
 public static void ServerInitialize(BigShip obj, Vector2 position, Vector2 velocity, ControlState controller1, ControlState controller2, ControlState controller3, ControlState controller4)
 {
     Ship.ServerInitialize(obj, position, velocity, 0, 500, 600, 300, 0.5f, controller1);
     Turret t = new Turret(obj.Game);
     Turret.ServerInitialize(t, obj, new Vector2(119, 95) - TextureLoader.GetTexture("Ship").CenterOfMass, (float)(Math.PI / 2), (float)(Math.PI / 3), controller2);
     Turret t2 = new Turret(obj.Game);
     Turret.ServerInitialize(t2, obj, new Vector2(119, 5) - TextureLoader.GetTexture("Ship").CenterOfMass, (float)(-Math.PI / 2), (float)(Math.PI / 3), controller3);
     Turret t3 = new Turret(obj.Game);
     Turret.ServerInitialize(t3, obj, new Vector2(145, 50) - TextureLoader.GetTexture("Ship").CenterOfMass, (float)(0), (float)(Math.PI / 3), controller1);
     Turret t4 = new Turret(obj.Game);
     Turret.ServerInitialize(t4, obj, new Vector2(20, 50) - TextureLoader.GetTexture("Ship").CenterOfMass, (float)(-Math.PI), (float)(Math.PI / 3), controller4);
     obj.Game.GameObjectCollection.Add(t);
     obj.Game.GameObjectCollection.Add(t2);
     obj.Game.GameObjectCollection.Add(t3);
     obj.Game.GameObjectCollection.Add(t4);
 }