/// <summary> /// returns a random plotpoint, null if a problem /// </summary> /// <returns></returns> public Plotpoint GetRandomPlotpoint(ThemeType theme) { Plotpoint plotPoint = null; int rnd = Random.Range(0, 100); plotPoint = arrayOfPlotpointLookup[rnd, (int)theme]; return(plotPoint); }
/// <summary> /// Add Plotpoint /// </summary> /// <param name="plot"></param> public void AddPlotpoint(Plotpoint plot) { try { dictOfPlotpoints.Add(plot.refTag, plot); } catch (ArgumentNullException) { Debug.LogError("Invalid plotpoint (Null)"); } catch (ArgumentException) { Debug.LogWarningFormat("Duplicate Plotpoint exists in dict for \"{0}\"", plot.refTag); } }