Ejemplo n.º 1
0
        public void MoveObjects()
        {
            //make the Bird fall
            Bird.Fall(_gravity);
            //make the Pipe mode
            //Pipe.Move(_speed);

            //Move each pipe in the collection of pipes
            //foreach(var pipe in Pipes)
            //{
            //    pipe.Move(_speed);
            //}
            Pipes.ForEach(x => x.Move(_speed)); //shorthand
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Injects the time into each measurement.
 /// </summary>
 /// <param name="date">The time at which the measurement was taken.</param>
 public void AddDates(DateTime date)
 {
     Houses.ForEach((House house) => house.CreatedAt     = date);
     Pipes.ForEach((Pipe pipe) => pipe.CreatedAt         = date);
     Sources.ForEach((Source source) => source.CreatedAt = date);
 }
Ejemplo n.º 3
0
 public Task Add(IEnumerable <IData> datas, bool binding = false)
 => Task.Run(() => datas.Split(Buffer, true).
             ForEach(d => Pipes.ForEach(pipe => pipe.Add(d, binding))));
Ejemplo n.º 4
0
 private void MoveObjects()
 {
     Bird.Fall(_gravity);
     Pipes.ForEach((pipe) => pipe.Move());
 }