private void inputMission() { int charamakeLevel = 0; foreach (Identity identity in choseIdentities) { charamakeLevel += identity.getLevel(); } charamakeLevel += choseJob.getLevel(); charamakeLevel += choseHumanity.getLevel(); List <MissionNode> missionNodes = new List <MissionNode>(); for (int i = 0; i < 20; i++) { IMissionBuilder builder = QuestHelper.getRandomMission(charamakeLevel); var missionNode = Instantiate(missionNodePrefab).GetComponent <MissionNode>(); missionNode.setQuest(builder); missionNodes.Add(missionNode); } missionSelectView = selectView.creatSelectView <MissionNode, IMissionBuilder>(missionNodes); var printMission = missionSelectView.getElement(); parameterView.printText(printMission.getName(), printMission.getDescription(), printMission.getFlavorText()); state = CharaMakeState.MISSION; }
/// <summary> /// 人間性の決定処理 /// </summary> private void humanityChose() { this.choseHumanity = humanitySelectView.getElement(); humanitySelectView.delete(); selectView.detach(); inputIdentity(); }
private void inputQuests() { selectviewContainer.detach(); deleteCursors(); List <IQuest> quests = new List <IQuest>(); quests.AddRange(player.getUndertakingQuests()); List <MenuQuestNode> nodes = new List <MenuQuestNode>(); foreach (var quest in quests) { Debug.Log("into " + quest); var questNode = Instantiate(menuQuestNodePrefab).GetComponent <MenuQuestNode>(); questNode.setQuest(quest); nodes.Add(questNode); } questSelectView = selectviewContainer.creatSelectView <MenuQuestNode, IQuest>(nodes); try{ inputQuestView(questSelectView.getElement()); }catch { Debug.Log("there are no quests"); } }
/// <summary> /// スキルをスクロールビューに表示させます /// </summary> private void inputSkills() { selectviewContainer.detach(); deleteCursors(); List <ISkill> skills = new List <ISkill>(); skills.AddRange(player.getActiveSkills()); skills.AddRange(player.getReactionSkills()); List <MenuSkillNode> skillNodes = new List <MenuSkillNode>(); foreach (ISkill skill in skills) { MenuSkillNode skillNode = Instantiate(menuSkillNodePrefab).GetComponent <MenuSkillNode>(); skillNode.setSkill(skill); skillNodes.Add(skillNode); } skillSelectView = selectviewContainer.creatSelectView <MenuSkillNode, ISkill>(skillNodes); try { inputSkillView(skillSelectView.getElement()); }catch { Debug.Log("there are no skills"); } }
/// <summary> /// インベントリ内のアイテムをスクロールビューに表示させます /// </summary> private void inputItems() { selectviewContainer.detach(); deleteCursors(); var inventory = player.getInventory(); var items = inventory.getItems(); var nodes = new List <MenuItemNode>(); foreach (IItem item in items) { var itemNode = Instantiate(menuItemNodePrefab).GetComponent <MenuItemNode>(); if (item.getCanStack()) { itemNode.setItem(inventory.getStack(item)); } else { itemNode.setItem(item); } nodes.Add(itemNode); } itemSelectView = selectviewContainer.creatSelectView <MenuItemNode, IItem>(nodes); try { inputItemView(itemSelectView.getElement()); }catch { Debug.Log("there are no items"); } }
public void missionChose() { this.choseMission = missionSelectView.getElement(); missionSelectView.delete(); selectView.detach(); Destroy(parameterView.gameObject); inputResult(); }
/// <summary> /// 職業の決定処理 /// </summary> private void jobChose() { this.choseJob = jobSelectView.getElement(); jobSelectView.delete(); selectView.detach(); inputHumanity(); Destroy(jobView.gameObject); }
/// <summary> /// 特徴の決定処理 /// </summary> private void identityChose() { this.choseIdentities.Add(identitySelectView.getElement()); if (this.choseIdentities.Count >= 3) { identitySelectView.delete(); selectView.detach(); inputMission(); } }
private void Update() { if (Input.GetKeyDown(KeyCode.DownArrow) || Input.GetKeyDown(KeyCode.UpArrow)) { int axis = getAxis(); selectView.moveTo(selectView.getIndex() + axis); } if (Input.GetKey(KeyCode.Return)) { title.loadWorldSelected(selectView.getElement()); Destroy(gameObject); } }
// Update is called once per frame void Update() { if ((Input.GetKeyDown(KeyCode.DownArrow) || Input.GetKeyDown(KeyCode.UpArrow)) && !isWindowInputing) { int axis = getAxis(); if (axis != 0) { moveCursor(axis); } } if ((Input.GetKeyDown(KeyCode.Return) && currentContent == MenuContents.INDEX) && !isWindowInputing) { indexChosen(indexSelectView.getElement()); } }
/// <summary> /// 特徴選択画面を表示させます /// </summary> private void inputIdentity() { List <IdentityNode> identityNodes = new List <IdentityNode>(); foreach (Identity identity in identities) { IdentityNode identityNode = Instantiate(identityNodePrefab).GetComponent <IdentityNode>(); identityNode.setIdentity(identity); identityNodes.Add(identityNode); } identitySelectView = selectView.creatSelectView <IdentityNode, Identity>(identityNodes); var printIdentity = identitySelectView.getElement(); parameterView.printText(printIdentity.getName(), printIdentity.getDescription(), printIdentity.getFlavorText()); state = CharaMakeState.IDENTITY; }
/// <summary> /// 職業選択画面を表示させます /// </summary> private void inputJob() { List <JobNode> jobNodes = new List <JobNode>(); foreach (Job job in jobs) { JobNode jobNode = Instantiate(jobNodePrefab).GetComponent <JobNode>(); jobNode.setJob(job); jobNodes.Add(jobNode); } jobSelectView = selectView.creatSelectView <JobNode, Job>(jobNodes); Vector3 viewPos = new Vector3(712f, Screen.height / 2); this.jobView = Instantiate(jobViewPrefab, viewPos, new Quaternion(0, 0, 0, 0)).GetComponent <CharaMakeJobView>(); jobView.printText(jobSelectView.getElement()); jobView.transform.SetParent(CanvasGetter.getCanvasElement().transform); state = CharaMakeState.JOB; }
/// <summary> /// パーティのキャラクターをスクロールビューに表示させます /// </summary> private void inputCharacters() { selectviewContainer.detach(); deleteCursors(); List <MenuCharacterNode> characterNodes = new List <MenuCharacterNode>(); foreach (IPlayable character in party.getParty()) { GameObject characterNodeObject = Instantiate(menuCharacterNodePrefab); MenuCharacterNode characterNode = characterNodeObject.GetComponent <MenuCharacterNode>(); characterNode.setCharacter(character); characterNodes.Add(characterNode); } try { characterSelectView = selectviewContainer.creatSelectView <MenuCharacterNode, IPlayable>(characterNodes); inputCharacterStateView(characterSelectView.getElement()); }catch { Debug.Log("there are no characters"); } }
/// <summary> /// 人間性選択画面を表示させます /// </summary> private void inputHumanity() { List <HumanityNode> humanityNodes = new List <HumanityNode>(); foreach (Humanity humanity in humanities) { HumanityNode humanityNode = Instantiate(humanityNodePrefab).GetComponent <HumanityNode>(); humanityNode.setHumanity(humanity); humanityNodes.Add(humanityNode); } humanitySelectView = selectView.creatSelectView <HumanityNode, Humanity>(humanityNodes); Vector3 viewPos = new Vector3(712f, Screen.height / 2); this.parameterView = Instantiate(parameterViewPrefab, viewPos, new Quaternion(0, 0, 0, 0)).GetComponent <CharaMakeParameterView>(); parameterView.transform.SetParent(CanvasGetter.getCanvasElement().transform); var printHumanity = humanitySelectView.getElement(); parameterView.printText(printHumanity.getName(), printHumanity.getDescription(), printHumanity.getFlavorText()); state = CharaMakeState.HUMANITY; }