diff options
| author | chai <chaifix@163.com> | 2021-01-04 15:08:37 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2021-01-04 15:08:37 +0800 | 
| commit | af50160ef5c9a55506157d7d94e20c17cd28ed42 (patch) | |
| tree | 95b8c3ee1974b0d5132675473a6cd8382fe99cc6 /Client/Assembly-CSharp/VoteBanSystem.cs | |
| parent | 00cfa93034c5b6fad750b395ac14a1c58c9dd93f (diff) | |
*协议
Diffstat (limited to 'Client/Assembly-CSharp/VoteBanSystem.cs')
| -rw-r--r-- | Client/Assembly-CSharp/VoteBanSystem.cs | 18 | 
1 files changed, 10 insertions, 8 deletions
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<int, int[]> Votes = new Dictionary<int, int[]>(); -	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<int>(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)  		{  | 
