// Use this for initialization void Start() { LibreriaS = GameObject.Find("Game Manager/").GetComponent <libreriaDeScrips>(); CrewillInstancia = new CrewildBase[6]; int Auxlevel = 10; CrewillInstancia[0] = new Beslin(Auxlevel); CrewillInstancia[2] = new crear_Crewild_Grismon_Insecto_Energia(Auxlevel); /* CrewillInstancia[3] = new Kanget(Auxlevel); * CrewillInstancia[4] = new Beslin(Auxlevel); * CrewillInstancia[5] = new Retolizar(Auxlevel);*/ // barras de estaminas // CrewillInstancia[0].EstadosCrewild = EstadosEnum.Paralize; // CrewillInstancia[1].EstadosCrewild = EstadosEnum.poison; // CrewillInstancia[0].EstadosCrewild = EstadosEnum.Paralize; // CrewillInstancia[0].Hp = CrewillInstancia[0].hpTotal / 2; BarraHp = GameObject.Find("informacion/estadisticas/NameBox/Hp").GetComponent <Scrollbar>(); HpInfo = GameObject.Find("informacion/estadisticas/NameBox/Hp/text").GetComponent <Text>(); BarraExp = GameObject.Find("informacion/estadisticas/NameBox/Exp").GetComponent <Scrollbar>(); SigNvl = GameObject.Find("informacion/estadisticas/NameBox/Exp/sig Nvl").GetComponent <Text>(); GeneralInfoObj = GameObject.Find("informacion/estadisticas/GeneralInfo"); CrewildInfoObj = GameObject.Find("informacion/estadisticas/CrewildInfo"); AttackObj = GameObject.Find("informacion/estadisticas/Attack"); PosturesObj = GameObject.Find("informacion/estadisticas/Postures"); breedingObj = GameObject.Find("informacion/estadisticas/Breeding"); //-------- panles Statick info ----------- NameCrewild = GameObject.Find("informacion/estadisticas/NameBox/NameCrewild").GetComponent <Text>(); Nivel = GameObject.Find("informacion/estadisticas/NameBox/NivelCriatura").GetComponent <Text>(); //-------- panles general info ----------- Crewild = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Crewild").GetComponent <Text>(); Nombre = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Nombre").GetComponent <Text>(); Tipo = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipo").GetComponent <Text>(); Estado = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Estados/Estado/Texto").GetComponent <Text>(); estadoImag = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Estados/Estado").GetComponent <Image>(); Efecto = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Efectos").GetComponent <Text>(); Descripcion = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Descripcion").GetComponent <Text>(); Tipos[0] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 1/Texto").GetComponent <Text>(); Tipos[1] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 2/Texto").GetComponent <Text>(); imagesTipos[0] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 1").GetComponent <Image>(); imagesTipos[1] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 2").GetComponent <Image>(); RectfTipo2 = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 2").GetComponent <RectTransform>(); //-------- panel CrewildInfo info ----------- ataque = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Ataque").GetComponent <Text>(); Defence = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Defensa").GetComponent <Text>(); Evation = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Velocidad").GetComponent <Text>(); Speed = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Evacion").GetComponent <Text>(); AtaClass = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/AtaClass").GetComponent <Text>(); DefClass = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/DefClass").GetComponent <Text>(); Resistence = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Resistence").GetComponent <Text>(); //---------- panel Attacks info --------------- for (int i = 0; i < 4; i++) { AtaqueText[i] = GameObject.Find("informacion/estadisticas/Attack/Movimientos/Attack" + (i + 1)).GetComponent <Text>(); } DescripcionAtaque = GameObject.Find("informacion/estadisticas/Attack/Descripcion/text").GetComponent <Text>(); //---------- panel Postures info --------------- Postures1 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura1").GetComponent <Text>(); Postures2 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura2").GetComponent <Text>(); Postures3 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura3").GetComponent <Text>(); Postures4 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura4").GetComponent <Text>(); //---------- panel crianza info --------------- HambreBarra = GameObject.Find("informacion/estadisticas/Breeding/estados/Hambre").GetComponent <Scrollbar>(); SueñoBarra = GameObject.Find("informacion/estadisticas/Breeding/estados/Sueño").GetComponent <Scrollbar>(); EmpatiaBarra = GameObject.Find("informacion/estadisticas/Breeding/estados/Empatia").GetComponent <Scrollbar>(); CorduraBarra = GameObject.Find("informacion/estadisticas/Breeding/estados/Cordura").GetComponent <Scrollbar>(); HambreText = GameObject.Find("informacion/estadisticas/Breeding/estados/Hambre/text").GetComponent <Text>(); SueñoText = GameObject.Find("informacion/estadisticas/Breeding/estados/Sueño/text").GetComponent <Text>(); EmpatiaText = GameObject.Find("informacion/estadisticas/Breeding/estados/Empatia/text").GetComponent <Text>(); CorduraText = GameObject.Find("informacion/estadisticas/Breeding/estados/Cordura/text").GetComponent <Text>(); //---------- panel breeding info --------------- TipePanel = GameObject.Find("informacion/estadisticas/panelType/textMenus").GetComponent <Text>(); //foto de criatura imagenCriatura = GameObject.Find("informacion/estadisticas/foto criatura/imagenCrewild").GetComponent <Image>(); //botones botones = GameObject.Find("informacion/Boton").GetComponent <Image>(); botones.enabled = false; RectfPanelAtaques = GameObject.Find("informacion/Selector").GetComponent <RectTransform>(); RectfPanelAtaques.GetComponent <Image>().enabled = false; // global text GeneralInfoObj.SetActive(true); CrewildInfoObj.SetActive(false); AttackObj.SetActive(false); PosturesObj.SetActive(false); breedingObj.SetActive(false); if (CargueDatos == false) { Invoke("InvokeCargar", 0.1f); CargueDatos = true; } EfectoFueraDeBatalla.verificador(); }
/// <summary> /// Metodo que devuelve la critatura y segun el nivel /// </summary> /// <param name="NombreClase"></param> /// <param name="nivel"></param> /// <returns></returns> public static CrewildBase EncontrarCrewild(string NombreClase, int nivel) { CrewildBase ClaseARetornar = null; switch (NombreClase) { case "Grismon": ClaseARetornar = new crear_Crewild_Grismon_Insecto_Energia(nivel); break; case "Eghi": ClaseARetornar = new crear_Crewild_Eghi_salvaje_insecto(nivel); break; case "Mixio": ClaseARetornar = new Mixio(nivel); break; case "Ouno": ClaseARetornar = new Ouno(nivel); break; case "Xilaxi": ClaseARetornar = new Xilaxi(nivel); break; case "Kraten": ClaseARetornar = new Kraten(nivel); break; case "Ihluv": ClaseARetornar = new Ihluv(nivel); break; //segunda tanda de Crewilds case "Keren": ClaseARetornar = new Keren(nivel); break; case "Kanget": ClaseARetornar = new Kanget(nivel); break; case "Artflow": ClaseARetornar = new Artflow(nivel); break; case "Beslin": ClaseARetornar = new Beslin(nivel); break; case "Retolizar": ClaseARetornar = new Retolizar(nivel); break; case "Dechet": ClaseARetornar = new Dechet(nivel); break; case "Silvere": ClaseARetornar = new Silvere(nivel); break; case "Chibull": ClaseARetornar = new Chibull(nivel); break; case "Rochad": ClaseARetornar = new Rochad(nivel); break; case "Vieper": ClaseARetornar = new Vieper(nivel); break; case "Kabat": ClaseARetornar = new Kabat(nivel); break; case "Tmand": ClaseARetornar = new Tmand(nivel); break; case "Ashsa": ClaseARetornar = new Ashsa(nivel); break; default: Debug.Log("no se ha encontra criatura:" + NombreClase + "nombre a Corregir"); break; } return(ClaseARetornar); }