Exemplo n.º 1
0
    public void SetTypeOfIntel()
    {
        string type = intelLabel.text;

        switch (type)
        {
        case "Bomb Material":
            Debug.Log("Bomb Material");
            typeOfIntel = GameManager.IntelType.BombMaterial;
            break;

        case "Hard Drive":
            Debug.Log("Hard Drive");
            typeOfIntel = GameManager.IntelType.HardDrive;
            break;

        case "Information":
            Debug.Log("Information");
            typeOfIntel = GameManager.IntelType.Info;
            break;

        default:
            Debug.LogError("The intel type passed was not a valid string.");
            break;
        }
        GM.intel = typeOfIntel;
    }
Exemplo n.º 2
0
    public void Generate(
        int enemies,
        int civilians,
        GameManager.IntelType intel,
        GameManager.HostilityLevel hostility
        )
    {
        GenerateRoom(room1Configs);
        GenerateRoom(room2Configs);
        GenerateRoom(room3Configs);
        GenerateRoom(room4Configs);

        Spawn(enemies, "EnemySpawns", new GameObject[] { enemyTarget });
        Spawn(civilians, "CivilianSpawns", new GameObject[] { civilianTarget });

        if (intel == GameManager.IntelType.Info)
        {
            Spawn(4, "SmallIntelSpawns", new GameObject[] { info });
            Spawn(1, "LargeIntelSpawns", new GameObject[] { bmm });
            Spawn(1, "SmallIntelSpawns", new GameObject[] { bomb });
        }
        else if (intel == GameManager.IntelType.HardDrive)
        {
            Spawn(4, "SmallIntelSpawns", new GameObject[] { harddrive });
            Spawn(1, "LargeIntelSpawns", new GameObject[] { bmm });
            //Spawn (1, "SmallIntelSpawns", new GameObject[] { bomb });
        }
        else
        {
            Spawn(3, "LargeIntelSpawns", new GameObject[] { bmm });
            Spawn(2, "SmallIntelSpawns", new GameObject[] { bomb });
        }

        switch (hostility)
        {
        case (GameManager.HostilityLevel.Low):
            backgroundSound.volume = 0.1f;
            break;

        case (GameManager.HostilityLevel.Medium):
            backgroundSound.volume = 0.5f;
            break;

        case (GameManager.HostilityLevel.High):
            backgroundSound.volume = 1;
            break;

        default:
            break;
        }
        backgroundSound.Play();
    }
Exemplo n.º 3
0
 public void SetTypeOfIntel(GameManager.IntelType type)
 {
     typeOfIntel = type;
 }