public static BigShip BigShipFactory(ServerGame game, Player player) { BigShip ship = new BigShip(game); BigShip.ServerInitialize(ship, game.WorldSize / 2, new Vector2(0, 0), player.Controller, player.Controller, player.Controller, player.Controller); game.GameObjectCollection.Add(ship); ControllerFocusObject controllerFocusObject = game.GameObjectCollection.GetMasterList().GetList <ControllerFocusObject>()[0]; controllerFocusObject.SetFocus(player, ship); return(ship); }
public static BigShip BigShipFactory(ServerGame game) { GoodAI controller1 = new GoodAI(game); GoodGunnerAI controller2 = new GoodGunnerAI(game); GoodGunnerAI controller3 = new GoodGunnerAI(game); GoodGunnerAI controller4 = new GoodGunnerAI(game); BigShip ship = new BigShip(game); BigShip.ServerInitialize(ship, Utils.RandomUtils.RandomVector2(new Vector2(500)) + game.WorldSize / 2, new Vector2(0, 0), controller1, controller2, controller3, controller4); game.GameObjectCollection.Add(ship); controller1.Focus = ship; controller1.TargetPosition = ship.Position; controller2.Focus = ship; controller3.Focus = ship; controller4.Focus = ship; return(ship); }