public ProceduralZone GetCurrentZone(int score) { ProceduralZone zone = zones.Where((z) => z.StartingScore <= score && z.EndingScore > score).First(); //Debug.Log(zone.StartingScore); return(zone); }
public float GetCurrentTimeScale(int score) { ProceduralZone zone = zones.Where((z) => z.StartingScore <= score && z.EndingScore > score).First(); float percent = ((float)score - zone.StartingScore) / ((float)zone.EndingScore - zone.StartingScore); return(Mathf.Lerp(zone.StartingSpeed, zone.EndingSpeed, percent)); }
public static BarData GetBarData(int score) { ProceduralZone zone = settings.GetCurrentZone(score); float size = RandomExtensions.RandomGaussian(zone.AverageSize, zone.SizeDistribution); size = Mathf.Clamp(size, zone.MinSize, zone.MaxSize); PickupType pickup = GetPickupType(); BarData data = new BarData(size: size, powerupType: pickup); return(data); }
public void RemoveZone(ProceduralZone zone) { zones.Remove(zone); }
public void AddZone(ProceduralZone zone) { zones.Add(zone); }