public override void SetRewardAmount(IRewardAmount rewardAmount) { var monoRewardAmount = rewardAmount as MonoRewardAmount; Debug.Assert(monoRewardAmount != null, "MonoRewardAmountがnullです"); this.monoInfoModel = this.monoInfoRepository.Get(monoRewardAmount.MonoInfoId); this.rewardMonoInfoView.UpdateView(this.monoInfoModel.Name); }
public PlayerMonoInfo( uint id, MonoInfo monoInfo, bool isRelease ) { this.Id = id; this.MonoInfo = monoInfo; this.IsRelease = isRelease; }
public PlayerMonoViewModel( uint id, MonoInfo monoInfo, int level ) { this.Id = id; this.MonoInfo = monoInfo; this.Level = level; }
public void Execute(IPlayerArrangementTarget arrangementTarget, MonoInfo monoInfo) { // プレイヤー情報の変更 arrangementTarget.RegisterMaking(monoInfo); playerArrangementTargetRepository.Store(arrangementTarget.PlayerArrangementTargetModel); // 予約 ArrangementResourceHelper.ReserveConsume(arrangementTarget.MonoInfo.ArrangementResourceAmount); GameManager.Instance.ArrangementManager.AddArrangement(arrangementTarget); }
static public ArrangementInfo Generate(Vector3 position, MonoInfo mono) { var arrangementX = Mathf.FloorToInt(position.x / ArrangementAnnotater.ArrangementWidth + 0.5f); var arrangementZ = Mathf.FloorToInt(position.z / ArrangementAnnotater.ArrangementHeight + 0.5f); var info = new ArrangementInfo() { x = arrangementX, z = arrangementZ, mono = mono }; return(info); }
public MonoViewModel CreateMono(MonoInfo monoInfo, Vector3 position) { var instance = Object.AppearToFloor(monoInfo.MonoPrefab, root, position); var monoView = instance.GetComponent <MonoView> (); Debug.Assert(monoView != null, "monoViewではありません"); // プレイヤー情報の作成 var playerMonoViewModel = this.monoViewCreateService.Execute(monoInfo.Id); var monoViewModel = new MonoViewModel(monoView, playerMonoViewModel); monoViewModels.Add(monoViewModel); return(monoViewModel); }
public PlayerArrangementTargetModel( uint id, Vector3 centerPosition, float range, List <ArrangementPosition> positions, ArrangementTargetState state, MonoInfo monoInfo, PlayerMonoViewModel playerMonoViewModel ) { this.Id = id; this.CenterPosition = centerPosition; this.Range = range; this.Positions = positions; this.State = state; this.MonoInfo = monoInfo; this.PlayerMonoViewModel = playerMonoViewModel; }
private PlayerArrangementTargetModel CreateByEntry(PlayerArrangementTargetEntry entry) { MonoInfo monoInfo = null; if (entry.HasMonoInfoId) { monoInfo = this.monoInfoRepository.Get(entry.MonoInfoId); Debug.Assert(monoInfo != null, "MonoInfoが存在していません"); } PlayerMonoViewModel monoViewModel = null; if (entry.HasMonoViewModelId) { monoViewModel = this.playerMonoViewRepository.Get(entry.MonoViewModelId); Debug.Assert(monoViewModel != null, "MonoViewModelが存在していません"); } var state = ArrangementTargetState.None; if (Enum.TryParse(entry.ArrangementTargetState, out ArrangementTargetState outState)) { state = outState; } return(new PlayerArrangementTargetModel( entry.Id, new Vector3(entry.CenterPosition.X, entry.CenterPosition.Y, entry.CenterPosition.Z), entry.Range, entry.ArrangementPositions.Select(pos => new ArrangementPosition() { x = pos.X, z = pos.Z, }).ToList(), state, entry.HasMonoInfoId ? monoInfo : null, entry.HasMonoViewModelId ? monoViewModel : null )); }
public PlayerArrangementTargetModel Create( Vector3 centerPosition, float range, List <ArrangementPosition> positions, ArrangementTargetState state, MonoInfo monoInfo, PlayerMonoViewModel playerMonoViewModel ) { var id = this.MaximuId() + 1; var entry = new PlayerArrangementTargetEntry() { Id = id, CenterPosition = new Position3Entry() { X = centerPosition.x, Y = centerPosition.y, Z = centerPosition.z }, Range = range, ArrangementPositions = positions.Select(pos => new Position2Entry() { X = pos.x, Z = pos.z }).ToArray(), ArrangementTargetState = state.ToString(), HasMonoInfoId = monoInfo != null, MonoInfoId = monoInfo != null ? monoInfo.Id : uint.MaxValue, HasMonoViewModelId = playerMonoViewModel != null, MonoViewModelId = playerMonoViewModel != null ? playerMonoViewModel.Id : uint.MaxValue }; this.entrys.Add(entry); PlayerContextMap.WriteEntry(this.entrys); return(CreateByEntry(entry)); }
public void SelectMonoInfo(MonoInfo monoInfo) { this.selecetedMonoInfo = monoInfo; }
public void SelectMonoInfo(MonoInfo MonoInfo) { this.selectedMonoInfo = MonoInfo; }
public void RemoveSelect() { this.selectedMonoInfo = null; }
public void SetTagetMonoInfo(MonoInfo monoInfo) { this.targetMonoInfo = monoInfo; }
public void RegisterMaking(MonoInfo monoInfo) { this.playerArrangementTargetModel.SetMonoInfo(monoInfo); }
public void SetMonoInfo(MonoInfo monoInfo) { this.MonoInfo = monoInfo; }
public void RegisterMaking(MonoInfo monoInfo) { this.MonoInfo = monoInfo; }
public PreMono(Mouse mouse, GameObject makingPrefab, MonoInfo mono) { this.mouse = mouse; this.makingPrefab = makingPrefab; this.mono = mono; }