public LogicProximitySensor(Segment segment, Int64 x, Int64 y, Int64 z, UInt16 cubeType, Byte flags, UInt16 value, IPlayerSource playerSource) : base(segment, x, y, z, cubeType, flags, value) { if (playerSource == null) { throw new ArgumentNullException(nameof(playerSource)); } _playerSource = playerSource; }
public void Update(IPlayerSource bot) { if (IsEnabled && Region.Contains(bot.MousePos)) { if (bot.IsButtonPressed(MouseButton.Left)) { Click?.Invoke(null); } else if (bot.IsButtonReleased(MouseButton.Left)) { MouseUp?.Invoke(null); } if (bot.IsButtonDown(MouseButton.Left)) { MouseDown?.Invoke(null); } } }