public void SetHostilityLevel() { string level = hostilityLabel.text; switch (level) { case "Low Hostility": hostilityLevel = GameManager.HostilityLevel.Low; Debug.Log("Low Hostility"); break; case "Medium Hostility": Debug.Log("Med Hostility"); hostilityLevel = GameManager.HostilityLevel.Medium; break; case "High Hostility": Debug.Log("High Hostility"); hostilityLevel = GameManager.HostilityLevel.High; break; default: Debug.LogError("The hostility level passed was not a valid string."); break; } GM.hostility = hostilityLevel; }
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(); }
public void SetHostilityLevel(GameManager.HostilityLevel level) { hostilityLevel = level; }