/// <summary> /// Transmit back the location and ID of this lifeform. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void GetAllLocationsEventHandler(object sender, ControlEvents.GetAllLocationsEventArgs e) { //delegate. Someone needs this one's location. if (e.SenderID != ID) { e.Add(Location, ID); } }
protected List <(Vector Location, string ID)> OnGetAllLocations(ControlEvents.GetAllLocationsEventArgs e) { getAllLocationsEventHandler eventHandler = RaiseGetAllLocations; if (eventHandler != null) { eventHandler.Invoke(this, e); return(e.GetInformation); } return(null); }