Пример #1
0
 public PlayerMouseViewModel(
     uint id,
     Vector3 position,
     Vector3 rotation,
     MouseViewState state,
     MakingAmount makingAmount,
     PlayerArrangementTargetModel playerArrangementTargetModel
     )
 {
     this.Id           = id;
     this.Position     = position;
     this.Rotation     = rotation;
     this.State        = state;
     this.MakingAmount = makingAmount;
     this.PlayerArrangementTargetModel = playerArrangementTargetModel;
 }
Пример #2
0
        public void ChangeState(Mouse mouse, IState state)
        {
            MouseViewState mouseViewState = MouseViewState.None;

            if (state is MoveToTarget)
            {
                mouseViewState = MouseViewState.Move;
            }
            else if (state is MakingState)
            {
                mouseViewState = MouseViewState.Making;
            }
            else if (state is BackToHomeState)
            {
                mouseViewState = MouseViewState.BackToHome;
            }
            else
            {
                Debug.Assert(false, "状態が不定です。");
            }
            this.mouseChangeStateService.Execute(mouse.PlayerMouseViewModel, mouseViewState);
        }
Пример #3
0
 public void ChangeState(MouseViewState state)
 {
     this.State = state;
 }
Пример #4
0
 public void Execute(PlayerMouseViewModel playerMouseViewModel, MouseViewState state)
 {
     Debug.Assert(playerMouseViewModel != null, "PlayerMouseViewModelが nullです");
     playerMouseViewModel.ChangeState(state);
     this.playerMouseViewRepository.Store(playerMouseViewModel);
 }