public static void addMultipleDebrisFromSingleType(weatherNode w) { if (w.TimesToAdd == 0 || w.weatherDebris == null) { return; } for (int i = 1; i <= w.TimesToAdd; i++) { var v = new WeatherDebrisPlus(new Vector2((float)Game1.random.Next(0, Game1.graphics.GraphicsDevice.Viewport.Width), (float)Game1.random.Next(0, Game1.graphics.GraphicsDevice.Viewport.Height)), w.weatherDebris.sourceRect, w.weatherDebris.animationIntervalOffset, w.weatherDebris.which, (float)Game1.random.Next(15) / 500f, (float)Game1.random.Next(-10, 0) / 50f, (float)Game1.random.Next(10) / 50f, w.weatherDebris.debrisTexture); thisWeatherDebris.Add(v); } }
public weatherNode(WeatherDebrisPlus w, int addThisMany) { weatherDebris = w; TimesToAdd = addThisMany; }