public Producer(Ressource product, int interval, int weight, int storeLimit, PointF position) { this.ProducedRessource = product; this.Interval = interval; this.Weight = weight; this.Store = 0; this.maxStore = storeLimit; this.Position = position; }
public FreightPackage(Ressource ressource, int amount) : this() { ContainedRessource = ressource; Amount = amount; }
private void createProducers( int producerCount ) { Random random = new Random(); for ( int i = 0; i <= producerCount; i++ ) { int ressourceID = random.Next( RessourceManager.Instance().ressourceCount() ); Ressource ressource = new Ressource( ressourceID ); PointF producerPosition = new PointF( random.Next( -50, 50 ) + this.Position.X, random.Next( -50, 50 ) + this.Position.Y ); Producer newProducer = new Producer( ressource, random.Next( 10000, 30000 ), random.Next( 1, 10 ), random.Next( 50, 150 ), producerPosition ); newProducer.newProducts += this.sendCarrier; this.repaint += newProducer.Repaint; this.producers.Add( newProducer ); } }