void Firmata_DigitalStateChangeReceived(object parSender, DigitalPinState parEventArgs) { if (_port >= 0 && _port != parEventArgs.Port) return; Observers.ForEach(o => o.OnNext(parEventArgs)); }
public void Clear(Player winner, Player loser) { Free = true; Started = false; BroadcastMessage(new SDuelBroadcastRound() { Flag = 1 }); BroadcastMessage(new SDuelBroadcastResult(winner.Character.Name, loser.Character.Name)); Challenger.Session.SendAsync(new SDuelAnsExit(DuelResults.NoError, (ushort)Challenged.Session.ID, Challenged.Character.Name)).Wait(); Challenged.Session.SendAsync(new SDuelAnsExit(DuelResults.NoError, (ushort)Challenger.Session.ID, Challenger.Character.Name)).Wait(); Observers.ForEach(x => x.Character.Spells.ClearBuffByEffect(SkillStates.DuelInterface).Wait()); Observers.Clear(); ChallengerPoints = 0; ChallengedPoints = 0; Challenger.Character.Duel = null; Challenged.Character.Duel = null; Challenger.Character.CharacterRegen -= Character_CharacterRegen; Challenged.Character.CharacterRegen -= Character_CharacterRegen; Challenger.Character.PlayerDie -= ChallengerDie; Challenged.Character.PlayerDie -= ChallengedDie; Challenger.Character.WarpTo(17).Wait(); Challenged.Character.WarpTo(17).Wait(); Challenger = null; Challenged = null; }
/// <summary> /// Notify all observers to call 'update()' method. Retuns tha basic state of bool's. /// </summary> private void notifyAll() { Observers.ForEach(element => { element.update(); }); _isDelivery = false; _isSold = false; }
void Firmata_AnalogStateChangeReceived(object parSender, FirmataEventArgs <AnalogState> parEventArgs) { if (_channel >= 0 && _channel != parEventArgs.Value.Channel) { return; } Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }
void Firmata_DigitalStateReceived(object parSender, FirmataEventArgs <DigitalPortState> parEventArgs) { if (_port >= 0 && _port != parEventArgs.Value.Port) { return; } Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }
void NotifyObservers(HtmlDoc htmlDoc) { Observers.ForEach(x => x.OnNext(htmlDoc)); }
internal void NotifyNewGeneration() { Observers.ForEach(observer => observer.OnNext(World)); }
void Firmata_StepperPositionReceived(object parSender, FirmataEventArgs <StepperPosition> parEventArgs) { Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }
private void I2CReplyReceived(object parSender, I2CEventArgs parEventArgs) { Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }
public void Notify() { Console.WriteLine($"Rate changed!!! New rate is {Rate}"); Observers.ForEach(item => item.Update(this)); }
void TrackingSource_StringReceived(object parSender, StringEventArgs parEventArgs) { Observers.ForEach(o => o.OnNext(parEventArgs.Text)); }
public void Notify() { Observers.ForEach(o => o.Update()); }
void Firmata_MultiStepperMoveCompelteReceived(object parSender, FirmataEventArgs <int> parEventArgs) { Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }
private void NotifyObservers() { Observers.ForEach(x => x.OnNext(Encoding.UTF8.GetString(ReadBuffer.Take(BytesRead).ToArray()))); }
public void Dispose() { Stop(); Observers.ForEach(x => x.OnCompleted()); HttpStream = null; }
void Firmata_SerialReplyReceived(object parSender, SerialEventArgs parEventArgs) { Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }