Esempio n. 1
0
    private void SetData()
    {
        //기본세팅
        page = 0;
        //선택지 세팅
        CodeBox.ClearList(boxTr);
        if (answerType == TalkBox.EVENT)
        {
            for (int i = 0; i < npc.have_Event.Count; i++)
            {
                int num = npc.have_Event[i];

                CodeBox.AddChildInParent(boxTr, box).GetComponent <Npc_Talk_Box>().SetBox(transform, num, NpcData.Instance.npcTalk_Event[num]);
            }
        }
        else//키워드 나열
        {
            for (int i = 0; i < NpcData.Instance.npcTalk_Keyword.Length; i++)
            {
                if (!NpcData.Instance.npcTalk_Keyword[i].unlock)
                {
                    continue;
                }
                CodeBox.AddChildInParent(boxTr, box).GetComponent <Npc_Talk_Box>().SetBox(transform, i, npc.Used_Keyword_Icon(i));
            }
        }
    }
Esempio n. 2
0
    public void MakeKnightList()
    {
        selectKnighObj.SetActive(true);

        CodeBox.ClearList(selectKnightListTr);

        foreach (Knight k in unit.knights)
        {
            if (k.teaming == true)
            {
                continue;
            }
            GameObject obj = CodeBox.AddChildInParent(selectKnightListTr, knightPrefab);

            obj.GetComponent <WorldKnightPrefab>().SetData(k);
        }

        //초기화.

        selectDayList.SetData(dungeon.GetDungeonProgress(d).SearchP == 100 ? true : false);

        CodeBox.ClearList(selectView);
        txrArr.Clear();
        Cnt = 0;
    }
Esempio n. 3
0
    //파티 List & 오브젝트(Select View)에 요소 추가
    public void AddKnightInParty(Knight k)
    {
        if (Cnt == 4)
        {
            return;
        }
        WorldKnightSelect obj = CodeBox.AddChildInParent(selectView, knightPrefabSelect).GetComponent <WorldKnightSelect>();

        //사용하지 않는 Texture 찾아 출력
        int i;

        for (i = 0; i < 4; i++)
        {
            if (txrArr.Contains(i) == false)
            {
                break;
            }
        }

        txrArr.Add(i);
        SkinObjs[i].SetData(k);
        obj.SetData(k.num, textures[i], i);

        Cnt++;
    }
Esempio n. 4
0
    public void CreateDungeonInWorld()
    {
        dungeon = DungeonData.Instance;
        for (int i = 0; i < 8; i++)
        {
            GameObject obj = CodeBox.AddChildInParent(dungeonPos[i], dungeon.dungeonObjArray[dungeon.dungeon_Progress[i].d.num]);
            obj.GetComponentInChildren <WorldDungeonPrefab>().SetData(dungeon.dungeon_Progress[i], i);
        }

        DungeonUpdate();
    }
Esempio n. 5
0
    //KightList생성
    public void MakeKinghtList(Transform list)
    {
        CodeBox.ClearList(list);

        int index = 0;

        foreach (Knight k in unit.knights)
        {
            GameObject obj = CodeBox.AddChildInParent(list, knightPrefab);
            obj.GetComponent <KnightPrefab>().SetData(k);
        }
    }
Esempio n. 6
0
    private void MonsterSetting()
    {
        Debug.Log(" MonsterSetting() 실행");

        //2-0 초기화
        phaseInMonsterCnt = 0;
        while (thing.Count > knightCount)
        {
            thing.RemoveAt(knightCount);
            thingTarget.RemoveAt(knightCount);
        }

        //2-1 표시될 몬스터를 showMonster에서 호출함
        for (int i = 0; i < 4; i++)
        {
            //2-1-E 더 이상 호출한 몬스터가 없음.
            if (monsterList.Count == 0)
            {
                //표시될 몬스터가 있으면, 로드 종료
                //               없으면, [승리] 상태가됨.
                if (mps[0].s.alive == AliveType.생존)
                {
                    for (; i < 4; i++)
                    {
                        msv[i].gameObject.SetActive(false);//스테이트,COL임
                    }
                    break;
                }
                State = BattleState.승리;
                return;
            }

            monsterObj = MonsterData.Instance.monsterPrefabs[monsterList[0].num];

            mps[i] = CodeBox.AddChildInParent(monsterPos[i], monsterObj).GetComponentInChildren <BattleMonsterPrefab>();
            //2-1-1 show와 thing 에 추가
            mps[i].SetData(monsterList[0], i, msv[i]);
            thing.Add(mps[i].s);
            thingTarget.Add(4 + i);
            phaseInMonsterCnt++;
            //2-1-1-2 스테이트 상태COL 활성화
            msv[i].gameObject.SetActive(true);
            msv[i].SetData(mps[i]);
            //2-1-2 호출된 몬스터는 리스트에서 삭제
            monsterList.Remove(monsterList[0]);
        }
        msv[4].gameObject.SetActive(false);//※이거 보스...


        //2-2 몬스터 세팅 완료했으니 전투 순서를 정해줌. (3-1 이동)
        Turn = 0;
        SettingTurn();
    }
Esempio n. 7
0
    public void SetForm()
    {
        DungeonProgress dp = EventData.Instance.battle_dp;

        formObj = new GameObject[dp.p.k.Length];

        int index = 0;

        foreach (int kNum in dp.p.k)
        {
            formObj[index] = CodeBox.AddChildInParent(BattleUI.transform, basicForm);

            formObj[index].GetComponent <Form>().SetData(battle.kps[index]);
            formObj[index++].SetActive(false);
        }
    }
Esempio n. 8
0
    //List에 표시되는 파티원들의 모습
    public void PartyInfoViewer()
    {
        Party p = DungeonData.Instance.dungeon_Progress[index].p;

        CodeBox.ClearList(partyInfo_ListTr);

        world.ResetTexture();//<< -- 텍스쳐임
        foreach (int kNum in p.k)
        {
            GameObject obj = CodeBox.AddChildInParent(partyInfo_ListTr, partyInfo_knight);

            Knight k = UnitData.Instance.knights[kNum];
            obj.GetComponent <KnightInfo_Simple>().SetData(k);
            obj.GetComponent <KnightInfo_Simple>().SetCharacter(world.TextureFinder(k));//<<-- 텍스쳐
        }
    }
Esempio n. 9
0
 public void SendBubble(string ment)
 {
     CodeBox.AddChildInParent(bubble_Tr, bubble).GetComponentInChildren <Bubble>().SetBubble(ment);
 }
Esempio n. 10
0
 public void SendStressText(int value)
 {
     CodeBox.AddChildInParent(stateText_Tr, textObj).GetComponentInChildren <StateTextEffect>().SetStressText(value);
 }
Esempio n. 11
0
 public void TestStory()
 {
     CodeBox.AddChildInParent(GameController.Instance.story_Tr, event_Story_Obj).GetComponent <Event_Story>().SetData("prolog");
 }