예제 #1
0
        public PlayerMouseViewModel Create(
            Vector3 position,
            MakingAmount makingAmount,
            PlayerArrangementTargetModel playerArrangementTargetModel
            )
        {
            var id    = this.MaximuId() + 1;
            var entry = new PlayerMouseViewEntry()
            {
                Id       = id,
                Position = new Position3Entry()
                {
                    X = position.x,
                    Y = position.y,
                    Z = position.z
                },
                Rotation = new Position3Entry()
                {
                    X = 0.0f,
                    Y = 0.0f,
                    Z = 0.0f
                },
                State                     = MouseViewState.None.ToString(),
                MakingAmountValue         = makingAmount.Value,
                MakingAmountMaxValue      = makingAmount.MaxValue,
                PlayerArrangementTargetId = playerArrangementTargetModel.Id
            };

            this.entrys.Add(entry);
            PlayerContextMap.WriteEntry(this.entrys);
            return(CreateByEntry(entry));
        }
예제 #2
0
파일: PreMono.cs 프로젝트: tkymx/NezumiLand
        public void StartMaking(PlayerArrangementTargetModel playerArrangementTargetModel)
        {
            this.makingInstane = Object.AppearToFloor(makingPrefab, mouse.transform.parent.gameObject, playerArrangementTargetModel.CenterPosition);

            this.preMonoView = this.makingInstane.GetComponent <PreMonoView>();
            Debug.Assert(this.preMonoView != null, "PreMonoView がセットされていません");

            this.currentMakingAmount = new MakingAmount(0, mono.MakingTime);
            this.preMonoView.UpdateView(this.currentMakingAmount.Rate);
        }
예제 #3
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;
 }
예제 #4
0
 public void ChangeMakingAmount(Mouse mouse, MakingAmount makingAmount)
 {
     this.mouseChangeMakingAmountService.Execute(mouse.PlayerMouseViewModel, makingAmount);
 }
예제 #5
0
 public void UpdateMakingAmount(MakingAmount makingAmount)
 {
     this.MakingAmount = makingAmount;
 }
예제 #6
0
파일: PreMono.cs 프로젝트: tkymx/NezumiLand
 public void ProgressMaking(MakingAmount deltaMakingAmount)
 {
     this.currentMakingAmount += deltaMakingAmount;
     this.preMonoView.UpdateView(this.currentMakingAmount.Rate);
 }
 public void Execute(PlayerMouseViewModel playerMouseViewModel, MakingAmount makingAmount)
 {
     Debug.Assert(playerMouseViewModel != null, "PlayerMouseViewModelが nullです");
     playerMouseViewModel.UpdateMakingAmount(makingAmount);
     this.playerMouseViewRepository.Store(playerMouseViewModel);
 }
예제 #8
0
파일: Mouse.cs 프로젝트: tkymx/NezumiLand
 public void ProgressMaking(MakingAmount deltaMakingAmount)
 {
     this.currentPreMono.ProgressMaking(deltaMakingAmount);
 }