public ProfilePlayer(float speedCar, float forceCar, int crimeRate, IAnalyticTools analyticTools) { AnalyticTools = analyticTools; CurrentState = new SubscriptionProperty <GameState>(); CurrentCar = new Car(speedCar, forceCar, crimeRate); InventoryModel = new InventoryModel(); }
public GameController(Transform placeForUi, ProfilePlayer profilePlayer) { SubscriptionProperty <float> leftMoveDiff = new SubscriptionProperty <float>(); SubscriptionProperty <float> rightMoveDiff = new SubscriptionProperty <float>(); TapeBackgroundController tapeBackgroundController = new TapeBackgroundController(leftMoveDiff, rightMoveDiff); AddController(tapeBackgroundController); InputGameController inputGameController = new InputGameController(leftMoveDiff, rightMoveDiff, profilePlayer.CurrentCar); AddController(inputGameController); CarController carController = new CarController(leftMoveDiff, rightMoveDiff); AddController(carController); AIController aiController = new AIController(placeForUi); AddController(aiController); var abilityController = ConfigureAbilityController(placeForUi, carController, profilePlayer); abilityController.ShowAbilities(); }
public override void Init(SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove, float speed) { base.Init(leftMove, rightMove, speed); _buttonMoveLeft.onClick.AddListener(OnClickLeft); _buttonMoveRight.onClick.AddListener(OnClickRight); }
public CarController(SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove) { _carView = LoadView <CarView>(_viewPath, null); WheelController wheelController = new WheelController(_carView, leftMove, rightMove); AddController(wheelController); }
public RewardController(SubscriptionProperty <GameState> currentState) { _currentState = currentState; _dailyRewardController = new DailyRewardController(); AddController(_dailyRewardController); _view = LoadView(); _view.Init(_dailyRewardController); _currentState.SubscribeOnChange(OnChangeGameState); }
public TapeBackgroundController(IReadOnlySubscriptionProperty <float> leftMove, IReadOnlySubscriptionProperty <float> rightMove) { _view = LoadView(); _diff = new SubscriptionProperty <float>(); _leftMove = leftMove; _rightMove = rightMove; _view.Init(_diff); _leftMove.SubscribeOnChange(Move); _rightMove.SubscribeOnChange(Move); }
public WheelController(CarView carView, SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove) { _leftMove = leftMove; _rightMove = rightMove; _diff = new SubscriptionProperty <float>(); _leftMove.SubscribeOnChange(Move); _rightMove.SubscribeOnChange(Move); _wheelView = LoadView(carView); _wheelView.Init(_diff); }
public GameController(Transform placeForUi, ProfilePlayer profilePlayer) { SubscriptionProperty <float> leftMoveDiff = new SubscriptionProperty <float>(); SubscriptionProperty <float> rightMoveDiff = new SubscriptionProperty <float>(); TapeBackgroundController tapeBackgroundController = new TapeBackgroundController(leftMoveDiff, rightMoveDiff); AddController(tapeBackgroundController); InputGameController inputGameController = new InputGameController(leftMoveDiff, rightMoveDiff, profilePlayer.CurrentCar); AddController(inputGameController); CarController carController = new CarController(); AddController(carController); }
public GameController(Transform placeForUi, ProfilePlayer profilePlayer, IReadOnlyList <IItem> items) { var leftMoveDiff = new SubscriptionProperty <float>(); var rightMoveDiff = new SubscriptionProperty <float>(); var tapeBackgroundController = new TapeBackgroundController(leftMoveDiff, rightMoveDiff); AddController(tapeBackgroundController); var inputGameController = new InputGameController(leftMoveDiff, rightMoveDiff, profilePlayer.CurrentCar); AddController(inputGameController); var carController = new CarController(profilePlayer); AddController(carController); // можно внедрить как зависимость для другого контроллера var abilityController = ConfigureAbilityController(placeForUi, carController, items); abilityController.ShowAbilities(); }
public virtual void Init(SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove, float speed) { _leftMove = leftMove; _rightMove = rightMove; _speed = speed; }
public InputGameController(SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove, Car car) { _view = LoadView(); _view.Init(leftMove, rightMove, car.Speed); }
public override void Init(SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove, SubscriptionProperty <float> speed) { base.Init(leftMove, rightMove, speed); UpdateManager.SubscribeToUpdate(MoveToRight); }
public override void Init(SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove, SubscriptionProperty <float> speed) { base.Init(leftMove, rightMove, speed); Input.gyro.enabled = true; UpdateManager.SubscribeToUpdate(Move); }
public InputGameController(SubscriptionProperty <float> leftMove, SubscriptionProperty <float> rightMove, Car car) { _view = LoadView <BaseInputView>(_viewPath, null); _view.Init(leftMove, rightMove, car.Speed.Value); }
public ProfilePlayer(float speedCar, IAnalyticTools analyticTools) { CurrentState = new SubscriptionProperty <GameState>(); CurrentCar = new Car(speedCar); AnalyticTools = analyticTools; }
public ProfilePlayer(float speedCar) { CurrentState = new SubscriptionProperty <GameState>(); CurrentCar = new Car(speedCar); }