public void Render() { BaseGame.Device.Clear(Color.LightSkyBlue); spriteBatch = (SpriteBatch)BaseGame.SpriteMgr.alphaSprite; spriteBatch.Draw(bgTexture, Vector2.Zero, bgRect, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, LayerDepth.BackGround); spriteBatch.Draw(rkTexture, new Vector2(50, 102), new Rectangle(0, 0, 75, 18), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0f); spriteBatch.Draw(piTexture, new Vector2(550, 102), new Rectangle(0, 0, 137, 18), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0f); roomList.Draw(BaseGame.SpriteMgr.alphaSprite, 1); rankList.Draw(BaseGame.SpriteMgr.alphaSprite, 1); BaseGame.FontMgr.DrawInScrnCoord("Rank", rankPos + new Vector2(8f, 4f), Control.fontScale, Color.White, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord("Name", rankPos + new Vector2(100f, 4f), Control.fontScale, Color.White, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord("Score", rankPos + new Vector2(250f, 4f), Control.fontScale, Color.White, 0f, Control.fontName); for (int i = 0; i < rankItems.Count; i++) { BaseGame.FontMgr.DrawInScrnCoord(rankItems[i].rank.ToString(), rankPos + new Vector2(10f, 20f + 15 * i), Control.fontScale, Color.White, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord(rankItems[i].name, rankPos + new Vector2(102f, 20f + 15 * i), Control.fontScale, Color.White, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord(rankItems[i].score.ToString(), rankPos + new Vector2(252f, 20f + 15 * i), Control.fontScale, Color.White, 0f, Control.fontName); } if (bLoaded) { spriteBatch.Draw(hdTexture, new Vector2(560, 128), new Rectangle(0, 0, 70, 70), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, LayerDepth.UI - 0.1f); BaseGame.FontMgr.DrawInScrnCoord("Name: " + myInfo.name, new Vector2(560, 200), Control.fontScale, Color.White, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord("Score: " + myInfo.score, new Vector2(560, 215), Control.fontScale, Color.White, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord("Rank: " + myInfo.rank, new Vector2(560, 230), Control.fontScale, Color.White, 0f, Control.fontName); } btnOK.Draw(BaseGame.SpriteMgr.alphaSprite, 1); }
public void Render() { BaseGame.Device.Clear(Color.LightSkyBlue); spriteBatch = (SpriteBatch)BaseGame.SpriteMgr.alphaSprite; spriteBatch.Draw(bgTexture, Vector2.Zero, bgRect, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, LayerDepth.BackGround); spriteBatch.Draw(rlTexture, new Vector2(50, 102), new Rectangle(0, 0, 79, 18), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0f); spriteBatch.Draw(riTexture, new Vector2(300, 102), new Rectangle(0, 0, 145, 18), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0f); //roomList.Clear(); roomList.Draw(BaseGame.SpriteMgr.alphaSprite, 1); rankList.Draw(BaseGame.SpriteMgr.alphaSprite, 1); btnEnter.Draw(BaseGame.SpriteMgr.alphaSprite, 1); btnCreate.Draw(BaseGame.SpriteMgr.alphaSprite, 1); btnRank.Draw(BaseGame.SpriteMgr.alphaSprite, 1); btnRefresh.Draw(BaseGame.SpriteMgr.alphaSprite, 1); if (bInRoom) { Monitor.Enter(heads); for (int i = 0; i < playerCount; i++) { if (heads.Count >= i + 1) { spriteBatch.Draw(heads[i], new Vector2(334, 157 + i * 140), new Rectangle(0, 0, 70, 70), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, LayerDepth.UI - 0.1f); } BaseGame.FontMgr.DrawInScrnCoord("Name: " + userNames[i], new Vector2(335, 230 + i * 140), Control.fontScale, Color.Black, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord("Score: " + scores[i], new Vector2(335, 245 + i * 140), Control.fontScale, Color.Black, 0f, Control.fontName); BaseGame.FontMgr.DrawInScrnCoord("Rank: " + ranks[i], new Vector2(335, 260 + i * 140), Control.fontScale, Color.Black, 0f, Control.fontName); } Monitor.Exit(heads); } if (bInRoom) { if (bIsHost) { btnStart.Draw(BaseGame.SpriteMgr.alphaSprite, 1); } btnQuit.Draw(BaseGame.SpriteMgr.alphaSprite, 1); } }