public void UpdateFocusedMenuItem() { string stageName = m_focusedMenuItem.m_param.m_name; //난이도 출력 StageParam p = m_focusedMenuItem.transform.Find("Parameter").GetComponent <StageParam>(); HideAllDifIcons(); ActiveDifIcons((int)p.Difficulty); if (World.GetUserSingleTone().m_edtStage.ContainsKey(stageName) == false) { m_focusedMenuItem.SetLock(); // 비활성화 m_focusedBestScore.gameObject.SetActive(false); // 최고점수 비활성화 m_focusedCost.text = m_focusedMenuItem.m_param.m_price + ""; m_uiCostImage.SetActive(true); } else { m_focusedMenuItem.SetUnlock(); if (World.GetUserSingleTone().m_edtStage[stageName].m_clearBestScore > 0) { m_focusedBestScore.gameObject.SetActive(true); // 최고점수 활성 m_focusedBestScore.text = "BEST: " + World.GetUserSingleTone().m_edtStage[stageName].m_clearBestScore; } else { m_focusedBestScore.gameObject.SetActive(false); // 최고점수 활성 } m_uiCostImage.SetActive(false); } }
private void Start() { sceneModel = MyInterfaceController.FindObjectOfInterface <ISceneModel>(); if (sceneModel != null) { param = sceneModel.GetStageParam(); // 値をセット currentStageText.text = param.CurrentStageName; desireCountText.text = param.DesireCount.ToString(); } }
private void Update() { if (sceneModel != null) { param = sceneModel.GetStageParam(); clickCountText.text = param.ClickCount.ToString(); marblePowerText.text = param.MarblePower.ToString(); } else { Debug.Log("ステージパラメーターを取得できません"); } }
public void OnMenuClick(StageParam stageParam) { string stageName = m_focusedMenuItem.m_param.m_name; if (World.GetUserSingleTone().m_edtStage.ContainsKey(stageName) == false) //보유하지 않은 스테이지 { m_yesnoPopUp.SetActive(true); } else { stageParam.ApplyParam(); SceneManager.LoadScene("Zone"); } }
public void CpyParamData(StageParam rhs) { this.m_name = rhs.m_name; this.StageNumber = rhs.StageNumber; //this.StageName = rhs.StageName; name exist this.m_price = rhs.m_price; this.Difficulty = rhs.Difficulty; this.Width = rhs.Width; this.Height = rhs.Height; this.AvgTime = rhs.AvgTime; this.Rotatable = rhs.Rotatable; this.Reversible = rhs.Reversible; this.ShuffleComplexity = rhs.ShuffleComplexity; this.ShuffleTime = rhs.ShuffleTime; }
private void ContextAddItemClicked(object sender, ToolItemEventArgs e) { var item = e.Item; DBItem row = null; object tag = tree.SelectedDBItem; if (item.Name == "Work") { row = new Work(); } else if (item.Name == "Work Stage") { row = new Stage(); if (tag is Work) { ((Stage)row).Work = (Work)tag; } } else if (item.Name == "Stage Parameter") { row = new StageParam(); if (tag is Stage) { ((StageParam)row).Stage = (Stage)tag; } } else if (item.Name == "Stage Procedure") { row = new StageProcedure(); if (tag is Stage) { ((StageParam)row).Stage = (Stage)tag; } } else if (item.Name == "Stage Reference") { row = new StageReference(); if (tag is Stage) { ((StageParam)row).Stage = (Stage)tag; } } else if (item.Name == "Group") { row = new UserGroup(); } else if (item.Name == "Template") { row = new Template(); if (tag is Template) { ((Template)row).Parent = (Template)tag; } } else if (item.Name == "Template Data") { row = new TemplateData(); if (tag is Template) { ((TemplateData)row).Template = (Template)tag; } } else if (item.Name == "User") { row = new User(); if (tag is Department) { ((User)row).Department = (Department)tag; } else if (tag is Position) { ((User)row).Position = (Position)tag; } //row.Access.Create foreach (var access in row.Access.Items.ToList()) { row.Access.Add(access.Group, access.Access & ~AccessType.Create); } } else if (item.Name == "Scheduler") { row = new Scheduler(); if (tag is DBProcedure) { ((Scheduler)row).Procedure = (DBProcedure)tag; } } ShowItem(row); }