Exemple #1
0
    void Start()
    {
        // battle infomation display
        Text PlaceLabel  = InfomationGroup.Find("PlaceLabel").GetComponent <Text>();
        Text TargetLabel = InfomationGroup.Find("TargetLabel").GetComponent <Text>();
        Text ThreatLabel = InfomationGroup.Find("ThreatLabel").GetComponent <Text>();

        db       = new DataBase("DT");
        roomInfo = RoomState.loadRoomData("json/quest_board");

        // 더미
        RoomState.playerID = 1;
        RoomState.place    = 1;
        RoomState.threat   = 1;

        /*
         * RoomState.orderUser = 1;
         * RoomState.addUser(2);
         * RoomState.addUser(3);
         * RoomState.addUser(4);
         * RoomState.addUser(5);
         */
        tupleType place  = db.getTuple("places", RoomState.place);
        tupleType threat = db.getTuple("threats", RoomState.threat);

        PlaceLabel.text  = string.Format("{0} - {1}", place["name"] as string, roomInfo.golaList[RoomState.gola]);
        TargetLabel.text = threat["name"] as string;

        Debug.Log(place["name"] as string + ", " + roomInfo.golaList[RoomState.gola] + ", " + threat["name"] as string + ", ");

        map = Map.loadMap(string.Format("json/threat/{0}", threat["file"] as string));
        runRegen(); // 설정한 대로 몬스터들을 재 매 설정 시간마다 몬스터를 생성시킵니다.

        if (map == null)
        {
            Debug.Log("map load error");
        }

        totalScore  = new Score();
        localScore  = new Score();
        threatScore = new ArrayList();

        for (int index = 0; index < map.threat.Count; index++)
        {
            threatScore.Add(new Score());
        }

        playerInit();
        usersInit();
        map.backgroundBatch(BackGround, 0);

        SceneFaderImage.GetComponent <Fader>().fadeOutStart(() => {
            SceneFaderImage.gameObject.SetActive(false);
        });
    }
Exemple #2
0
    void Start()
    {
        // issue - UI별로 script분리 필요
        uiData    = RoomState.loadRoomData("json/quest_board");
        currentUI = (int)UIStatus.Main;
        prevUI    = (int)UIStatus.Main;
        homeBtnAction();

        room.Add("Skill", new ArrayList()); // skills

        userList = new ArrayList();

        db = new DataBase("DT");

        threatList   = db.getList("threats");
        placeList    = db.getList("places");
        skillList    = db.getList("skills");
        jobClassList = db.getList("jobclass");

        userSkillList = new ArrayList();
        for (int i = 0; i < uiData.skillSpecNameList.Length; i++)
        {
            userSkillList.Add(i);
            //(string)skillList[i + 1]["name"]
        }

        mySpec           = new Ability();
        mySpec.nameStr   = "주인공";
        mySpec.jobClass  = 1;
        mySpec.mainSkill = 2;
        room.Add("OrderUser", 1);

        dummyUsers = new ArrayList();
        dummyUsers.Add(2);
        dummyUsers.Add(3);
        dummyUsers.Add(4);
        dummyUsers.Add(5);

        recruitmentFlag = false;

        SceneFaderImage.GetComponent <Fader>().fadeOutStart(() => {
            SceneFaderImage.gameObject.SetActive(false);
        });
    }