Barotrauma Client Doc
|
Public Types | |
enum class | VoteState { None = 0 , Started = 1 , Running = 2 , Passed = 3 , Failed = 4 } |
Public Member Functions | |
int | GetVoteCountYes (VoteType voteType) |
int | GetVoteCountNo (VoteType voteType) |
int | GetVoteCountMax (VoteType voteType) |
void | SetVoteCountYes (VoteType voteType, int value) |
void | SetVoteCountNo (VoteType voteType, int value) |
void | SetVoteCountMax (VoteType voteType, int value) |
void | UpdateVoteTexts (IEnumerable< Client > clients, VoteType voteType) |
void | ResetVotes (IEnumerable< Client > connectedClients) |
bool | ClientWrite (IWriteMessage msg, VoteType voteType, object data) |
Returns true if the given data is valid for the given vote type, returns false otherwise. If it returns false, the message must be discarded or reset by the caller, as it is now malformed :) More... | |
void | ClientRead (IReadMessage inc) |
Static Public Member Functions | |
static T | HighestVoted< T > (VoteType voteType, IEnumerable< Client > voters) |
static T | HighestVoted< T > (VoteType voteType, IEnumerable< Client > voters, out int voteCount) |
Definition at line 6 of file BarotraumaShared/SharedSource/Networking/Voting.cs.
|
strong |
Enumerator | |
---|---|
None | |
Started | |
Running | |
Passed | |
Failed |
Definition at line 8 of file BarotraumaShared/SharedSource/Networking/Voting.cs.
void Barotrauma.Voting.ClientRead | ( | IReadMessage | inc | ) |
Definition at line 201 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
bool Barotrauma.Voting.ClientWrite | ( | IWriteMessage | msg, |
VoteType | voteType, | ||
object | data | ||
) |
Returns true if the given data is valid for the given vote type, returns false otherwise. If it returns false, the message must be discarded or reset by the caller, as it is now malformed :)
Definition at line 134 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
int Barotrauma.Voting.GetVoteCountMax | ( | VoteType | voteType | ) |
Definition at line 39 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
int Barotrauma.Voting.GetVoteCountNo | ( | VoteType | voteType | ) |
Definition at line 34 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
int Barotrauma.Voting.GetVoteCountYes | ( | VoteType | voteType | ) |
Definition at line 29 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
|
static |
Definition at line 31 of file BarotraumaShared/SharedSource/Networking/Voting.cs.
|
static |
Definition at line 36 of file BarotraumaShared/SharedSource/Networking/Voting.cs.
void Barotrauma.Voting.ResetVotes | ( | IEnumerable< Client > | connectedClients | ) |
Definition at line 112 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
void Barotrauma.Voting.SetVoteCountMax | ( | VoteType | voteType, |
int | value | ||
) |
Definition at line 52 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
void Barotrauma.Voting.SetVoteCountNo | ( | VoteType | voteType, |
int | value | ||
) |
Definition at line 48 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
void Barotrauma.Voting.SetVoteCountYes | ( | VoteType | voteType, |
int | value | ||
) |
Definition at line 44 of file BarotraumaClient/ClientSource/Networking/Voting.cs.
void Barotrauma.Voting.UpdateVoteTexts | ( | IEnumerable< Client > | clients, |
VoteType | voteType | ||
) |
Definition at line 57 of file BarotraumaClient/ClientSource/Networking/Voting.cs.