Пример #1
0
        void gear_LapCompleted(GearBase gear)
        {
            int index = this.gears.IndexOf(gear);

            index++;

            if (index == this.gears.Count)//non ci sono altri ingranaggi
            {
                isCurrentable = false;
                if (this.Completed != null)
                {
                    this.Completed(this);
                }
            }
            else
            {
                this.gears[index].Turn();
            }
        }
Пример #2
0
 public void Add(GearBase gear)
 {
     gear.LapCompleted += new Events.LapCompleteEventHandler(gear_LapCompleted);
     this.gears.Add(gear);
 }