-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyInput.cs
47 lines (42 loc) · 1.59 KB
/
MyInput.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System.Collections.Generic;
using System.Diagnostics.Eventing.Reader;
using ENet;
using MelonLoader;
using Placemaker.Ui;
using UnityEngine;
namespace LittleMultiplayer
{
public static class MyInput
{
public static MelonMod thisMod;
public static KeyCode myKeycode = KeyCode.None;
public static void GetInput()
{
// Don't accept input before keycodes are loaded from settings
if(GUI.isInitialized)
{
/*
if (UnityEngine.Input.GetKeyDown(myKeycode))
{
if (GlobalVars.isClient)
{
StandardSender.SendText(GlobalVars.activeClient.serverPeer, "the client says hello!", false);
foreach (KeyValuePair<uint, Client.Player> singlePlayer in GlobalVars.activeClient.playerList)
{
MelonLogger.Msg("ID: " + singlePlayer.Value.playerID + " | Name: " + singlePlayer.Value.playerName + " | Color: " + ColorUtility.ToHtmlStringRGBA(singlePlayer.Value.playerColor) + " isServer: " + singlePlayer.Value.isServer);
}
}
else if (GlobalVars.isServer)
{
//StandardSender.SendText(GlobalVars.activeClient.serverPeer, "the server says hello!", true);
foreach (KeyValuePair<uint, Server.Player> singlePlayer in GlobalVars.activeServer.PlayerList)
{
MelonLogger.Msg("ID: " + singlePlayer.Value.playerID + " | Name: " + singlePlayer.Value.playerName + " | IP: " + singlePlayer.Value.playerIP + " | Logged in: " + singlePlayer.Value.isLoggedIn + " | Color: " + ColorUtility.ToHtmlStringRGBA(singlePlayer.Value.playerColor) + " isServer: " + singlePlayer.Value.isServer);
}
}
}
*/
}
}
}
}