public ShipShootController(playerInput playerInput, GameStarter.ShipSettings shipSettings) { _playerInput = playerInput; _shipSettings = shipSettings; _bullet = shipSettings._bullet; _barrel = shipSettings._barrel; }
public ShipMoveController(playerInput playerInput, Transform transform, GameStarter.ShipSettings shipSettings) { _playerInput = playerInput; var moveTransform = new AccelerationMove(transform, shipSettings._speed, shipSettings._acceleration); var rotation = new RotationShip(transform); _shipMove = new ShipMove(moveTransform, rotation); }
public GameInitialization(Controllers controllers, Transform transform, GameStarter.ShipSettings shipSettings, Camera camera) { var playerInput = new playerInput(transform, camera); var shipMoveController = new ShipMoveController(playerInput, transform, shipSettings); var shipShootController = new ShipShootController(playerInput, shipSettings); controllers.Add(shipMoveController); controllers.Add(shipShootController); }