public Vehicle(int _numDoors, Coordinates _Co_ordinates) { this.NumberOfDoors = _numDoors; this.Id = IdVehicles.Count + 1; IdVehicles.Add(this.Id); delegateStartMachine += StartEngine; delegateStartMachine += () => { SpecifyLocations(_Co_ordinates); }; delegateStartMachine += MarkYourPlaceOnTheMap; RunDelegateStartMachine(); Console.WriteLine("Vehicle"); this._listOfPassengers = new List <Animal>(); }
public void AddCallback(DelegateStartMachine function) { delegateStartMachine += function; }