public void CreateAndSetMono(PlayerArrangementTargetModel playerArrangementTargetModel) { var monoViewModel = GameManager.Instance.MonoManager.CreateMono(playerArrangementTargetModel.MonoInfo, playerArrangementTargetModel.CenterPosition); var foundArrangementTarget = this.arrangementTargetStore.Find(arrangementTarget => arrangementTarget.PlayerArrangementTargetModel.Equals(playerArrangementTargetModel)); Debug.Assert(foundArrangementTarget != null, "配置ターゲットがありません"); // 生成した viewModel をセット this.setMonoViewModelToArrangementService.Execute(foundArrangementTarget, monoViewModel); // 隣接お願いの確認 this.AppendNearArrangement(foundArrangementTarget); GameManager.Instance.OnegaiMediaterManager.NearOnegaiMediater.MediateByArrangement(foundArrangementTarget); // 設置数のお願いの確認 var arrangemntMonoId = playerArrangementTargetModel.MonoInfo.Id; this.onegaiMediater.Mediate( new NL.OnegaiConditions.ArrangementCount(), playerOnegaiRepository.GetAll().ToList() ); // 配置時のイベント GameManager.Instance.EventManager.PushEventParameter(new NL.EventCondition.AfterArrangement()); }
public void PushConstantlyEventParameter() { var currentSatisfaction = this.satisfactionCalculater.CalcFieldSatisfaction(); GameManager.Instance.EventManager.PushEventParameter(new NL.EventCondition.Time(GameManager.Instance.TimeManager.ElapsedTime)); GameManager.Instance.EventManager.PushEventParameter(new NL.EventCondition.AboveSatisfaction(currentSatisfaction)); // 通常の判断 this.onegaiMediater.Mediate( new NL.OnegaiConditions.AboveSatisfaction(currentSatisfaction), playerOnegaiRepository.GetAll().ToList() ); }