public RaceUseCase(RacePresenter presenter, RacePlayerQWOP racePlayerQWOP, RaceGoal raceGoal, Action <bool, float, bool, float> onChangeResult, Action onChangeTitle, int selectRace) { _presenter = presenter; _racePlayerQWOP = racePlayerQWOP; _onChangeResult = onChangeResult; _onChangeTitle = onChangeTitle; _raceGoal = raceGoal; _raceGoal.RegisterEnter(OnGoal); _racePlayerQWOP.Setup(OnGoal); _presenter.Setup(_racePlayerQWOP); _presenter.RegisterLeftUpper(OnAccelerationLeftUpper); _presenter.RegisterRightUpper(OnAccelerationRightUpper); _presenter.RegisterLeftLower(OnAccelerationLeftLower); _presenter.RegisterRightLower(OnAccelerationRightLower); AbsolutelyActiveCorutine.WaitSecondInvoke(() => { _isTapped = false; _presenter.PlaySignal(() => { _startTime = Time.realtimeSinceStartup; _isStart = true; _presenter.StartTime(); _racePlayerQWOP.Go(); }); }, 1.5f); _startTime = 0f; _tapCount = 0; _isStart = false; _isGoal = false; _selectRace = selectRace; }
public void Setup(RacePlayerQWOP racePlayerQwop) { _view.Time.gameObject.SetActive(false); _view.Length.gameObject.SetActive(false); _racePlayerQwop = racePlayerQwop; }