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);
        }
 internal void Apply(ControlState controlState)
 {
     this.ResetReader();
     controlState.Aimpoint = this.ReadVector2();
     controlState.AngleControl = this.ReadFloat();
     controlState.TargetAngle = this.ReadFloat();
     controlState.MovementControl = this.ReadFloat();
     controlState.Fire = this.ReadBoolean();
 }
 public ControlStateUpdate(GameTime currentGameTime, ControlState controlState)
     : base(currentGameTime)
 {
     this.Append(controlState.Aimpoint);
     this.Append(controlState.AngleControl);
     this.Append(controlState.TargetAngle);
     this.Append(controlState.MovementControl);
     this.Append(controlState.Fire);
 }
        public static void ServerInitialize(Ship ship, Vector2 position, Vector2 velocity, float direction, int health, float maxSpeed, float acceleration, float maxAgularSpeed, ControlState controller)
        {
            MovingGameObject.ServerInitialize(ship, position, new Vector2(0), direction, 0, 0);
            ship.health.Value = health;
            ship.maxSpeed.Value = maxSpeed;
            ship.acceleration.Value = acceleration;
            ship.maxAgularSpeed.Value = maxAgularSpeed;

            ship.controller = controller;
        }
 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);
 }
        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);
        }