Ejemplo n.º 1
0
    private void ZoneDifficulty(Global.ZoneLevels whichZone)
    {
        switch (whichZone)
        {
        case Global.ZoneLevels.ShieldZone:
            zoneEazyIcon.SetActive(false);
            zoneMediumIcon.SetActive(false);
            zoneHardIcon.SetActive(false);
            break;

        case Global.ZoneLevels.EasyZone:
            zoneEazyIcon.SetActive(true);
            zoneMediumIcon.SetActive(false);
            zoneHardIcon.SetActive(false);
            break;

        case Global.ZoneLevels.MediumZone:
            zoneEazyIcon.SetActive(true);
            zoneMediumIcon.SetActive(true);
            zoneHardIcon.SetActive(false);
            break;

        case Global.ZoneLevels.HardZone:
            zoneEazyIcon.SetActive(true);
            zoneMediumIcon.SetActive(true);
            zoneHardIcon.SetActive(true);
            break;
        }
    }
Ejemplo n.º 2
0
 public void SetAsteroidSize(Object requestObject, Global.AstroidType astroidType, Global.ZoneLevels zoneLevels)
 {
     if (requestObject.GetType().Name == nameof(AsteroidGenerator) && (int)astroidType < 2)
     {
         this.astroidType = astroidType;
         formWhichZone    = zoneLevels;
         SizeGenerator();
     }
 }
Ejemplo n.º 3
0
    private void spawnEnemies(int amountToSpawn, Global.ZoneLevels currentZone)
    {
        for (int i = 0; i < amountToSpawn; ++i)
        {
            Instantiate(
                enemiesToSpawn[Random.Range(0, enemiesToSpawn.Length)],
                randomPosition(Global.zonesRadius[(int)currentZone - 1], Global.zonesRadius[(int)currentZone]),
                new Quaternion()
                ).gameObject.transform.SetParent(container);

            /*
             * switch (currentZone) {
             *
             *  case Global.ZoneLevels.EasyZone:
             *
             *      Instantiate(
             *          enemiesToSpawn[Random.Range(0, enemiesToSpawn.Length)],
             *          randomPosition(Global.zoneValues[(int)currentZone-1], Global.zoneValues[(int)currentZone]),
             *          new Quaternion()
             *      ).gameObject.transform.SetParent(container);
             *
             *      break;
             *
             *  case Global.ZoneLevels.MediumZone:
             *
             *      Instantiate(
             *          enemiesToSpawn[Random.Range(0, enemiesToSpawn.Length)],
             *          randomPosition(Global.zoneValues[(int)currentZone - 1], Global.zoneValues[(int)currentZone]),
             *          new Quaternion()
             *      ).gameObject.transform.SetParent(container);
             *
             *      break;
             *
             *  case Global.ZoneLevels.HardZone:
             *
             *      Instantiate(
             *          enemiesToSpawn[Random.Range(0, enemiesToSpawn.Length)],
             *          randomPosition(Global.zoneValues[(int)currentZone - 1], Global.zoneValues[(int)currentZone]),
             *          new Quaternion()
             *      ).gameObject.transform.SetParent(container);
             *
             *      break;
             *
             * }
             */
        }
    }