public static void OnUpdate(IntPtr @this) { Hooks.o_OnUpdate(@this); if (Input.GetKeyDown(KeyCode.F1)) { GetRandomPlayer().HIHKBDLNLMN.CmdReportDeadBody(null); } else if (Input.GetKeyDown(KeyCode.F2)) { GetRandomPlayer().HIHKBDLNLMN.CmdReportDeadBody(GetRandomPlayer()); } else if (Input.GetKeyDown(KeyCode.F3)) { foreach (var a in GameData.Instance.AllPlayers) { var player = new PlayerInfoProxy(a); if (player.IsImpostor) { player._object.SetKillTimer(0); player._object.MurderPlayer(GetRandomPlayer().HIHKBDLNLMN); break; } } } else if (Input.GetKeyDown(KeyCode.F4)) { GetMe().HIHKBDLNLMN.Die(NPLMBOLMMLB.Kill); } }
private static string BuildNames(bool checkImposter = false) { string b = string.Empty; for (int i = 0; i < GameData.Instance.AllPlayers.Count; i++) { if (checkImposter) { var player = new PlayerInfoProxy(GameData.Instance.AllPlayers[i]); if (player.IsImpostor) { b += player.PlayerName; } } else { b += new PlayerInfoProxy(GameData.Instance.AllPlayers[i]).PlayerName; } if (i != GameData.Instance.AllPlayers.Count - 1) { b += "|"; } } return(b); }
private static GameData.IHEKEPMDGIJ GetMe() { foreach (var a in GameData.Instance.AllPlayers) { PlayerInfoProxy me = new PlayerInfoProxy(a); if (me.PlayerName == "cy") { return(a); } } return(null); }
private static GameData.IHEKEPMDGIJ GetRandomPlayer() { List <GameData.IHEKEPMDGIJ> list = new List <GameData.IHEKEPMDGIJ>(); foreach (var a in GameData.Instance.AllPlayers) { PlayerInfoProxy me = new PlayerInfoProxy(a); if (me.PlayerName != "cy") { list.Add(a); } } return(list[UnityEngine.Random.Range(0, list.Count)]); }