public void TerminarDesafio3() { for (int i = 0; i < spawner.Length; i++) { spawner[i].SetActive(false); } cmp_levelSt.challengeActive = false; timerstart = false; if (cmp_plyMod.playerLife >= 3) { cmp_spwn.ArraySpawnGeneretor(itmsObj[Random.Range(0, itmsObj.Length)], itmPosGen); cmp_spwn.ArraySpawnGeneretor(itmsObj[Random.Range(0, itmsObj.Length)], itmPosGen); } else if (cmp_plyMod.playerLife == 2) { cmp_spwn.ArraySpawnGeneretor(itmsObj[Random.Range(0, itmsObj.Length)], itmPosGen); } }
/*public Vector3 RhinoDir(int dirRhino) * { * * return * }*/ void SpawnRhino() { timer += Time.deltaTime; if (timer >= max_timer) { cmp_spwn.ArraySpawnGeneretor(rhino_obj[0], spawnPositions[Random.Range(0, spawnPositions.Length)]); timer = 0; } }
public void TerminarDesafio2() { for (int i = 0; i < spawner.Length; i++) { spawner[i].SetActive(false); } cmp_levelSt.challengeActive = false; timerstart = false; if (timer < opcionesTimer[0]) { cmp_spwn.ArraySpawnGeneretor(itmsObj[Random.Range(0, itmsObj.Length)], itmPosGen); cmp_spwn.ArraySpawnGeneretor(itmsObj[Random.Range(0, itmsObj.Length)], itmPosGen); } else if (timer < opcionesTimer[1]) { cmp_spwn.ArraySpawnGeneretor(itmsObj[Random.Range(0, itmsObj.Length)], itmPosGen); } }
// Update is called once per frame void Update() { spawnTimer += Time.deltaTime; if(spawnTimer >= maxSpawnTimer) { cmp_spawn.ArraySpawnGeneretor(weapons[Random.Range(0, weapons.Length)], weaponsPosGen); //cmp_spawn.ArraySpawnGeneretor(weapons[Random.Range(0, weapons.Length)], weaponsPosGen); spawnTimer = 0; } }
void ThrowAtack() { if (cmp_enemy_model.meleAtack == false) { cmp_enemy_model.bossOnAtack = true; cmp_enemy_model.throwAtack = true; cmp_spwn.ArraySpawnGeneretor(martiloProyectil, boss_pos); } //cmp_spwn.BasicInstantiate(martiloProyectil, boss_pos.x, boss_pos.y, boss_pos.z); }
void SpawnBomb() { timer += Time.deltaTime; if (timer >= max_timer) { //RechargePosition(); cmp_spwn.ArraySpawnGeneretor(bomb_obj[0], spawnPositions[Random.Range(0, spawnPositions.Length)]); cmp_spwn.latestGen.GetComponent <BombScript>().goplayerPosition1 = GameObject.FindWithTag("Player").transform.position; timer = 0; } }
void SpawnLion() { timer += Time.deltaTime; if (timer >= max_timer) { RechargeLife(); cmp_spwn.ArraySpawnGeneretor(lion_obj[0], spawnPositions[Random.Range(0, spawnPositions.Length)]); timer = 0; } }
void SpawnSpear() { timer += Time.deltaTime; if (timer >= max_timer) { //RechargePosition(); cmp_spwn.ArraySpawnGeneretor(spear_obj[0], spawnPositions[Random.Range(0, spawnPositions.Length)]); if (cmp_spwn.latestGen.GetComponent <SpearProyectil>().target != null) { cmp_spwn.latestGen.GetComponent <SpearProyectil>().RotToPlayer(); } timer = 0; } }
// Start is called before the first frame update private void OnEnable() { cmp_spwn.ArraySpawnGeneretor(rhino_obj[0], spawnPositions[Random.Range(0, spawnPositions.Length)]); timer = 0; }
void ThrowAtack() { cmp_spwn.ArraySpawnGeneretor(martiloProyectil, boss_pos); //cmp_spwn.BasicInstantiate(martiloProyectil, boss_pos.x, boss_pos.y, boss_pos.z); }