public static void OnPositionChanged(PositionChangedCommand positionChangedCommand, ILocationControl locationControl, IClientContext clientContext) { var character = clientContext.Characters.Get(positionChangedCommand.CharacterId); if (character == null) return; character.Data.Position = positionChangedCommand.Position; locationControl.Update(character); }
public static void OnCharacterDetected(CharacterDetectedCommand characterDetectedCommand, ILocationControl locationControl, IClientContext clientContext) { clientContext.Characters.Add(characterDetectedCommand.Character); locationControl.Add(characterDetectedCommand.Character); }