diff options
| author | Sarah B <git@sarahduck.ca> | 2023-12-24 21:04:19 -0800 |
|---|---|---|
| committer | Sarah B <git@sarahduck.ca> | 2023-12-24 21:04:19 -0800 |
| commit | 0206e04e0a3542b8f0fc97996f1d885f7604a6fa (patch) | |
| tree | 575f1388978b110064993445b73dcf268218a750 /MouseNet.cs | |
| parent | c4dd5d6fe58a21f9cab5ce271cd3554c2fe791e3 (diff) | |
network mouse click, restructure oneko, add framework for NPCState stuff
Diffstat (limited to 'MouseNet.cs')
| -rw-r--r-- | MouseNet.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MouseNet.cs b/MouseNet.cs index 9521a25..1588dd0 100644 --- a/MouseNet.cs +++ b/MouseNet.cs @@ -18,9 +18,11 @@ class MouseNet : Mouse }; Client.PacketRecived += (reader, user, packetType) => { - if (user != MyUser || packetType != PacketType.MousePosition) return; + if (user != MyUser || packetType != PacketType.MouseState) return; Position = reader.GetVector2(); + bool clicked = reader.GetBool(); + if (clicked) Clicked?.Invoke(this); InvisibleTimer = 0f; }; |
