From af50160ef5c9a55506157d7d94e20c17cd28ed42 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 4 Jan 2021 15:08:37 +0800 Subject: =?UTF-8?q?*=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assembly-CSharp/VoteBanSystem.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'Client/Assembly-CSharp/VoteBanSystem.cs') diff --git a/Client/Assembly-CSharp/VoteBanSystem.cs b/Client/Assembly-CSharp/VoteBanSystem.cs index 23d030f..9b8c6bd 100644 --- a/Client/Assembly-CSharp/VoteBanSystem.cs +++ b/Client/Assembly-CSharp/VoteBanSystem.cs @@ -3,22 +3,19 @@ using System.Collections.Generic; using Hazel; using InnerNet; +// 投票 public class VoteBanSystem : InnerNetObject { public static VoteBanSystem Instance; public Dictionary Votes = new Dictionary(); - public enum RpcCalls - { - AddVote - } - public void Awake() { VoteBanSystem.Instance = this; } + // RpcVote public void CmdAddVote(int clientId) { this.AddVote(AmongUsClient.Instance.ClientId, clientId); @@ -64,9 +61,14 @@ public class VoteBanSystem : InnerNetObject { int[] array; return this.Votes.TryGetValue(clientId, out array) && Array.IndexOf(array, AmongUsClient.Instance.ClientId) != -1; - } - - public override void HandleRpc(byte callId, MessageReader reader) + } + + public enum RpcCalls + { + AddVote + } + + public override void HandleRpc(byte callId, MessageReader reader) { if (callId == 0) { -- cgit v1.1-26-g67d0