public void DestinationReached(FactionLogic.Genre genre, bool foundCandy) { if (foundCandy) { successfulPoliceStings++; IncrementGameMeter(); } }
public void DeployPoliceSquad(FactionLogic.Genre genre, House targetHouse) { Police deployedSquad = (Police)Instantiate(police, policeSpawnPoint.position, policeSpawnPoint.rotation); deployedSquad.transform.parent = gameObject.transform; deployedSquad.setTargetGenre(genre); deployedSquad.SetHouse(targetHouse); }
private House PickHouse(FactionLogic.Genre genre) { List<House> houses = houseController.GetPartyingHousesByGenre(genre); if (houses.Count == 0) return null; System.Random random = new System.Random(); int r = random.Next(houses.Count); return houses[r]; }
public List <House> GetPartyingHousesByGenre(FactionLogic.Genre genre) { List <House> partyingHouses = new List <House>(); foreach (House house in houses) { if (house.hasPerformingBand && house.genre == genre) { partyingHouses.Add(house); } } return(partyingHouses); }
private void GeneratePoliceSquad() { FactionLogic.Genre targetGenre = PickGenre(); House targetHouse = PickHouse(targetGenre); //Debug.Log(string.Format("Genre: {0}, House: {1}", targetGenre, targetHouse)); if (targetHouse != null) { // Problematic if no houses are partying with the picked genre // Can be solved by adjusting the PickGenre() method. policeStation.DeployPoliceSquad(targetGenre, targetHouse); } }
public void PlayMusic(Band band) { this.genre = band.genre; playingBand = band; isSettingUp = true; tearTimeLeft = 0.0f; if (genre == FactionLogic.Genre.HIP_HOP) { audioSource.clip = songList[0]; } else if (genre == FactionLogic.Genre.METAL) { audioSource.clip = songList[1]; } else if (genre == FactionLogic.Genre.OPERA) { audioSource.clip = songList[2]; } audioSource.Play(); }
public void setTargetGenre(FactionLogic.Genre genre) { targetGenre = genre; }
public void DestinationReached(FactionLogic.Genre genre, bool candyFound) { policeController.DestinationReached(genre, candyFound); }
public void SetGenre(FactionLogic.Genre genre) { this.genre = genre; }