// Use this for initialization void Start() { //캐릭터 생성~ //커서 생성~ //스테이지 불러오기~ Stage = 1; started = false; monsterpref[0] = Resources.Load <GameObject>("3D/Monster1R") as GameObject; monsterpref[1] = Resources.Load <GameObject>("3D/Monster1Y") as GameObject; monsterpref[2] = Resources.Load <GameObject>("3D/Monster1B") as GameObject; Character[] l_ch = new Character[4]; moveorder = new bool[4] { false, false, false, false }; GameObject tmp; tmp = GameObject.Find("Selected Character Status(Clone)"); if (null != tmp) { u_CS = tmp.GetComponent <CharacterSet>(); } l_ch = u_CS.Ch; int[][] skills = new int[4][]; for (int i = 0; i < 4; ++i) { //ui_PI[i] = GameObject.Find("PLAYERICON" + i).GetComponent<PlayerIcon>(); ui_PI[i].init(); if (125 == l_ch[i].ch_type) { continue; } ui_PI[i].connected = true; iscconnected[i] = true; usercount += 1; ui_PI[i].ch_type = l_ch[i].ch_type; ui_PI[i].nickname = u_CS.nickname[i]; ui_PI[i].level = l_ch[i].clearedround; ui_PI[i].show(); Cursor[i].active = true; PC[i] = Instantiate(CharacterSet[l_ch[i].ch_type], new Vector3(-32, 7355, -28), Quaternion.identity).GetComponent <PlayerCharacter>(); PC[i].init(l_ch[i]); skills[i] = l_ch[i].skill; } ui_infected.init(); ui_infected.show(); SS.init(skills); //Stage data load try { XmlDocument doc = new XmlDocument(); doc.Load(Application.persistentDataPath + "/SavedData.xml"); XmlElement root = doc.DocumentElement; XmlNodeList nodes = root.ChildNodes; int count = 0; stageinfoset = new StageInfo[1]; foreach (XmlNode node in nodes) { stageinfoset[count].stagenumber = byte.Parse(node["stagenumber"].InnerText); stageinfoset[count].stagename = node["stagename"].InnerText; stageinfoset[count].round = byte.Parse(node["round"].InnerText); stageinfoset[count].monsterperwave = new byte[stageinfoset[count].round]; for (int i = 0; i < stageinfoset[count].round; ++i) { stageinfoset[count].monsterperwave[i] = byte.Parse(node["r" + (i + 1).ToString()].InnerText); } count++; } stageinfo = stageinfoset[Stage - 1]; Round = 0; monsterwave = stageinfo.monsterperwave[Round]; } catch (Exception e) { Debug.Log(e); //error; } time = u_timer + RESTTIME; PC[0].init(); }