//Work /// <summary> /// First Load Map /// </summary> private void Set_FirstStart() { l2_GroundCode = new List <List <char> >(); l2_ObjectCode = new List <List <char> >(); l2_Ground = new List <List <GameObject> >(); l2_Object = new List <List <GameObject> >(); for (int i = 0; i < v2_SizeMap.x; i++) { l2_GroundCode.Add(new List <char>()); l2_ObjectCode.Add(new List <char>()); l2_Ground.Add(new List <GameObject>()); l2_Object.Add(new List <GameObject>()); for (int j = 0; j < v2_SizeMap.y; j++) { l2_GroundCode[i].Add(l_GroundCode[0]); l2_ObjectCode[i].Add(l_ObjectCode[0]); { GameObject g_Ground = cl_Object.Set_Prepab_Create(l_Ground[0], this.transform); g_Ground.GetComponent <Isometric_Single>().Set_Pos(new Vector2(i, j)); g_Ground.GetComponent <Isometric_Single>().b_isObject = false; l2_Ground[i].Add(g_Ground); } { GameObject g_Object = cl_Object.Set_Prepab_Create(l_Object[0], this.transform); g_Object.GetComponent <Isometric_Single>().Set_Pos(new Vector2(i, j)); g_Object.GetComponent <Isometric_Single>().b_isObject = true; l2_Object[i].Add(g_Object); } } } }
//Add /// <summary> /// Add to List /// </summary> /// <param name="g_Prepab"></param> public void Set_ListPrepab(GameObject g_Prepab, string s_ID) { int i_Exist = Get_Prepab_Index(s_ID); if (i_Exist == Get_Prepab_Index_NotFound()) { Class_Object cs_Object = new Class_Object(); l_Prepab.Add(cs_Object.Set_Prepab_Create(g_Prepab, t_ListContent)); l_ID.Add(s_ID); } else { Set_ListPrepab(g_Prepab, i_Exist); } }