/// <summary> /// 戻るが選択された時の処理 /// </summary> public void backChose() { if (skillView != null) { Destroy(skillView.gameObject); } skillView = null; if (itemView != null) { Destroy(itemView.gameObject); } itemView = null; if (stateView != null) { Destroy(stateView.gameObject); } stateView = null; if (questView != null) { Destroy(questView.gameObject); } questView = null; inputIndex(); }
/// <summary> /// スキル選択時の処理 /// </summary> /// <param name="skill">選択されたスキル</param> private void inputSkillView(ISkill skill) { if (skillView == null) { skillView = Instantiate(menuSkillViewPrefab, new Vector3(312, 384, 0), new Quaternion(0, 0, 0, 0)).GetComponent <MenuSkillView>(); skillView.transform.SetParent(CanvasGetter.getCanvasElement().transform); } skillView.printSkill(skill); }