// TODO: (matt) need a minimum wait time that is tunable private IEnumerator CheckForBite() { float secondsToWait = UnityEngine.Random.Range(1, 15); print("Waiting... " + secondsToWait); yield return(new WaitForSeconds(secondsToWait)); int biteIndex = RandomProbability.Rand(ActiveFishTypes, ActiveBiteFrequency, 9); FishBite(biteIndex, fishTypeScores[biteIndex]); }
private void GenerateFish() { // TODO: (matt) could probably switch to fish name here ActiveFishTypes = new int[numberOfFish]; ActiveBiteFrequency = new int[numberOfFish]; for (int i = 0; i < numberOfFish; ++i) { // figure out what fish are in the pond int fishTypeIndex = RandomProbability.Rand(FishDescription.FishType, FishDescription.OccurFrequency, 5); ActiveFishTypes[i] = FishDescription.FishType[fishTypeIndex]; ActiveBiteFrequency[i] = FishDescription.BiteFrequency[fishTypeIndex]; } }