void SetBulletsPool(int level) { if (level > GameManager.Instance.tablesEtc.disparosJugador.Count - 1) { return; } playerShots?.ClearPool(); var newShotPrefab = GameManager.Instance.tablesEtc.disparosJugador[level]; playerShots = EZObjectPool.CreateObjectPool(newShotPrefab, "PlayerShots" + level, 15, true, true, true); }
public void Destruirtodo() { idAhora = 0; Objeto_principal.destruirtodoaca(); objectPool.ClearPool(); Posicion.Clear(); Objprincipal.Clear(); Listarayos.Clear(); objectPool.InstantiatePool(); iteraciones = 0; estado = 0; if (valorx == null) { valorx = GameObject.Find("X_valor").GetComponent <InputField>(); } if (valory == null) { valory = GameObject.Find("Y_valor").GetComponent <InputField>(); } if (valorz == null) { valorz = GameObject.Find("Z_valor").GetComponent <InputField>(); } x_value = int.Parse(valorx.text); y_value = int.Parse(valory.text); z_value = int.Parse(valorz.text); if (int1 == null) { int1 = GameObject.Find("primerint").GetComponent <InputField>(); } if (int2 == null) { int2 = GameObject.Find("segundoint").GetComponent <InputField>(); } if (int3 == null) { int3 = GameObject.Find("tercerint").GetComponent <InputField>(); } if (int4 == null) { int4 = GameObject.Find("cuartoint").GetComponent <InputField>(); } if (int5 == null) { int5 = GameObject.Find("quintoint").GetComponent <InputField>(); } int1_value = int.Parse(int1.text); int2_value = int.Parse(int2.text); int3_value = int.Parse(int3.text); int4_value = int.Parse(int4.text); int5_value = int.Parse(int5.text); generarCubos(); }
private void OnDestroy() { objectPool.ClearPool(); }