Esempio n. 1
0
        /// <summary>
        /// データを設定します
        /// </summary>
        /// <param name="level">世界のレベル</param>
        public void setDatas(int level)
        {
            this.jobs       = JobMasterManager.getInstance().getJobsFromLevel(level);
            this.humanities = HumanityMasterManager.getInstance().getHumanitiesFromLevel(level);
            this.identities = IdentityMasterManager.getInstance().getIdentitiesFromLevel(level);
            Vector3 viewPos = new Vector3(200, Screen.height / 2);

            selectView = Instantiate(selectViewPrefab, viewPos, new Quaternion(0, 0, 0, 0)).GetComponent <SelectViewContainer>();
            Debug.Log(CanvasGetter.getCanvasElement().transform);
            selectView.transform.SetParent(CanvasGetter.getCanvasElement().transform);

            inputJob();
        }
Esempio n. 2
0
        // Use this for initialization
        void Awake()
        {
            menuIndexNodePrefab     = (GameObject)Resources.Load("Prefabs/MenuIndexNode");
            menuItemNodePrefab      = (GameObject)Resources.Load("Prefabs/MenuItemNode");
            menuSkillNodePrefab     = (GameObject)Resources.Load("Prefabs/MenuSkillNode");
            menuItemViewPrefab      = (GameObject)Resources.Load("Prefabs/MenuItemView");
            menuSkillViewPrefab     = (GameObject)Resources.Load("Prefabs/MenuSkillView");
            menuCharacterNodePrefab = (GameObject)Resources.Load("Prefabs/MenuCharacterNode");
            menuCharacterViewPrefab = (GameObject)Resources.Load("Prefabs/MenuCharacterStateView");
            useWindowPrefab         = (GameObject)Resources.Load("Prefabs/UseWindow");
            menuQuestNodePrefab     = (GameObject)Resources.Load("Prefabs/MenuQuestNode");
            menuQuestViewPrefab     = (GameObject)Resources.Load("Prefabs/MenuQuestView");
            menuBackWindowPrefab    = (GameObject)Resources.Load("Prefabs/BackWindow");

            selectviewContainer = Instantiate((GameObject)Resources.Load("Prefabs/SelectView")).GetComponent <SelectViewContainer>();
            selectviewContainer.transform.position = transform.position;
            selectviewContainer.GetComponent <RectTransform>().sizeDelta -= new Vector2(0, 60);
            selectviewContainer.transform.position -= new Vector3(50, 30, 0);
            selectviewContainer.transform.SetParent(transform);
        }
Esempio n. 3
0
    public void setState(List <int> ids, TitleManager manager)
    {
        this.transform.position = new Vector3(Screen.width / 2, Screen.height / 2);

        selectviewContainer = Instantiate((GameObject)Resources.Load("Prefabs/SelectView")).GetComponent <SelectViewContainer>();
        selectviewContainer.transform.position = this.transform.position;
        selectviewContainer.transform.SetParent(transform);

        var worldNodePrefab = (GameObject)Resources.Load("Prefabs/WorldLoadNode");
        var worldLoadNodes  = new List <WorldLoadNode>();

        foreach (int id in ids)
        {
            var node = Instantiate(worldNodePrefab).GetComponent <WorldLoadNode>();
            node.setId(id);
            worldLoadNodes.Add(node);
        }

        selectView = selectviewContainer.creatSelectView <WorldLoadNode, int>(worldLoadNodes);

        title = manager;
    }