1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

XNA sample updated to vs2010, xna 4.0

This commit is contained in:
lidgren
2010-10-29 19:02:52 +00:00
parent 350a603e84
commit 3e054eecc7
7 changed files with 123 additions and 58 deletions

View File

@@ -108,16 +108,16 @@ namespace XnaGameClient
{
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin(SpriteBlendMode.AlphaBlend);
spriteBatch.Begin(SpriteSortMode.Texture, BlendState.AlphaBlend);
// draw all players
foreach (long who in positions.Keys)
foreach (var kvp in positions)
{
// use player unique identifier to choose an image
int num = (int)Math.Abs(who) % 5;
int num = ((int)Math.Abs(kvp.Key)) % textures.Length;
// draw player
spriteBatch.Draw(textures[num], positions[who], Color.White);
spriteBatch.Draw(textures[num], kvp.Value, Color.White);
}
spriteBatch.End();