public void PlayerVoteFor(Player player, Vote.Options option) { currentVote.AddVote(player, option); RpcPlayerVoteFor(player.gameObject, (byte)option); if (currentVote.Ended) { var result = currentVote.GetResult(); if (result == Vote.Options.Yes) { RpcVotePassed(); } else if (result == Vote.Options.No) { RpcVoteFailed(); } TargetOnVoteResult(currentVote.Owner.connectionToClient, (byte)currentVote.GetResult()); currentVote = null; } }