本文整理汇总了C#中ReceiveDataReader.ReadVariableInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDataReader.ReadVariableInt32方法的具体用法?C# ReceiveDataReader.ReadVariableInt32怎么用?C# ReceiveDataReader.ReadVariableInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReceiveDataReader
的用法示例。
在下文中一共展示了ReceiveDataReader.ReadVariableInt32方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Client_ReceiveUpdateBulletCount
void Client_ReceiveUpdateBulletCount( RemoteEntityWorld sender, ReceiveDataReader reader )
{
normalMode.BulletCount = reader.ReadVariableInt32();
normalMode.BulletMagazineCount = reader.ReadVariableInt32();
alternativeMode.BulletCount = reader.ReadVariableInt32();
alternativeMode.BulletMagazineCount = reader.ReadVariableInt32();
}
示例2: Client_ReceiveUpdateRunEnergy
private void Client_ReceiveUpdateRunEnergy(RemoteEntityWorld sender, ReceiveDataReader reader)
{
int value = reader.ReadVariableInt32();
if (!reader.Complete())
return;
RunEnergy = value;
}
示例3: Client_ReceiveUpdateData
void Client_ReceiveUpdateData( RemoteEntityWorld sender, ReceiveDataReader reader )
{
while( reader.BitPosition < reader.EndBitPosition )
{
uint identifier = reader.ReadVariableUInt32();
int frags = reader.ReadVariableInt32();
float ping = reader.ReadSingle();
Client_Player player = Client_GetPlayer( identifier );
if( player != null )
{
player.Frags = frags;
player.Ping = ping;
}
}
}
示例4: Client_ReceiveSpawnId
private void Client_ReceiveSpawnId(RemoteEntityWorld sender, ReceiveDataReader reader)
{
int spawnId = reader.ReadVariableInt32();
if (!reader.Complete())
return;
spawnid = (SpawnId)spawnId;// EntityTypes.Instance.GetByName(s);
}
示例5: Client_ReceiveAddUser
void Client_ReceiveAddUser( RemoteEntityWorld sender, ReceiveDataReader reader )
{
uint identifier = reader.ReadVariableUInt32();
string name = reader.ReadString();
bool bot = reader.ReadBoolean();
int team = reader.ReadVariableInt32();
uint userIdentifier = reader.ReadVariableUInt32();
if( !reader.Complete() )
return;
//check for already exists
{
Client_Player playerForCheck = Client_GetPlayer( identifier );
if( playerForCheck != null )
{
Log.Fatal( "PlayerManager: Client_ReceiveAddUserToClient: Player " +
"with identifier \"{0}\" is already exists.", identifier );
}
}
UserManagementClientNetworkService.UserInfo user = null;
if( userIdentifier != 0 )
user = GameNetworkClient.Instance.UserManagementService.GetUser( userIdentifier );
Client_Player player = new Client_Player( identifier, name, bot, user );
client_players.Add( player );
}
示例6: Client_ReceiveUpdateData
private void Client_ReceiveUpdateData(RemoteEntityWorld sender, ReceiveDataReader reader)
{
while (reader.BitPosition < reader.EndBitPosition)
{
uint identifier = reader.ReadVariableUInt32();
int hitPoints = reader.ReadVariableInt32();
int killPoints = reader.ReadVariableInt32();
int assaultCredits = reader.ReadVariableInt32();
float ping = reader.ReadSingle();
Client_Player player = Client_GetPlayer(identifier);
if (player != null)
{
player.HitPoints = hitPoints;
player.KillPoints = killPoints;
player.AssaultCredits = assaultCredits;
player.Ping = ping;
}
}
}