Пример #1
0
 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);
     }
 }
Пример #2
0
 /*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;
     }
 }
Пример #3
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);
     }
 }
Пример #4
0
 // 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;
     }
 }
Пример #5
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);
    }
Пример #6
0
 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;
     }
 }
Пример #7
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;
        }
    }
Пример #8
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;
        }
    }
Пример #9
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;
 }
Пример #10
0
 void ThrowAtack()
 {
     cmp_spwn.ArraySpawnGeneretor(martiloProyectil, boss_pos);
     //cmp_spwn.BasicInstantiate(martiloProyectil, boss_pos.x, boss_pos.y, boss_pos.z);
 }