Beispiel #1
0
 public void InitializeView(ICrashAssessmentViewModel crash, ILandingAssessmentViewModel win)
 {
     _crashViewModel          = crash;
     _landingViewModel        = win;
     _crashViewModel.OnCrash += ShowTitle;
     _landingViewModel.IsWin += ShowTitle;
 }
Beispiel #2
0
 public ViewManager(ShipView shipView,
                    CrashEffectView crashEffectView,
                    IMoveViewModel moveViewModel,
                    FuelView fuelView,
                    EndGameMessageView endGameMessageView,
                    StartButtonView startButtonView,
                    ExitButtonView exitButtonView,
                    TitleView titleView,
                    IHitListener hitListener,
                    IFuelViewModel fuelViewModel,
                    IGameManager gameManager)
 {
     _shipView                   = shipView;
     _crashEffectView            = crashEffectView;
     _moveViewModel              = moveViewModel;
     _fuelView                   = fuelView;
     _endGameMessageView         = endGameMessageView;
     _startButtonView            = startButtonView;
     _exitButtonView             = exitButtonView;
     _titleView                  = titleView;
     _fuelViewModel              = fuelViewModel;
     _crashAssessmentViewModel   = hitListener.CrashAssessment;
     _landingAssessmentViewModel = hitListener.LandingAssessment;
     _gameManager                = gameManager;
 }
Beispiel #3
0
 public ShipAudioPlayer(AudioSource audioSource, IHitListener hitListener, IMoveViewModel moveViewModel)
 {
     _audioSource      = audioSource;
     _crashViewModel   = hitListener.CrashAssessment;
     _landingViewModel = hitListener.LandingAssessment;
     _moveViewModel    = moveViewModel;
 }
Beispiel #4
0
 public HitListener(Transform ship, IWinModel winModel, ICrashModel crashModel)
 {
     LandingAssessment = new LandingAssessmentViewModel(winModel);
     CrashAssessment   = new CrashAssessmentViewModel(crashModel);
     _ship             = ship;
     _isOnPlatform     = false;
 }
Beispiel #5
0
 public void InitializeView(ICrashAssessmentViewModel crash, ILandingAssessmentViewModel win, IGameManager gameManager)
 {
     _crashViewModel          = crash;
     _landingViewModel        = win;
     _crashViewModel.OnCrash += ShowButton;
     _landingViewModel.IsWin += ShowButton;
     _startBtn.onClick.AddListener(gameManager.RebootGame);
 }
Beispiel #6
0
 public CameraController(Transform ship, CameraData data, ICrashAssessmentViewModel crash, ILandingAssessmentViewModel win)
 {
     _camera          = Camera.main;
     _focusLock       = new CameraFocusLock(false);
     _cameraMagnifier = new CameraMagnifier(new CameraModel(data), _camera, ship);
     _win             = win;
     _crash           = crash;
 }
Beispiel #7
0
 public CrashingShipComponents(Transform ship, ICrashAssessmentViewModel crashViewModel)
 {
     _crashComponents = new List <CrashComponentEffectView>();
     _crashViewModel  = crashViewModel;
     _ship            = ship;
 }
Beispiel #8
0
 public void InitializeView(ICrashAssessmentViewModel crashViewModel)
 {
     _viewModel          = crashViewModel;
     _viewModel.OnCrash += OnCrash;
 }