コード例 #1
0
ファイル: WorldDrawer.cs プロジェクト: OCox1991/Genome
 /// <summary>
 /// Draws the creature viewing window
 /// </summary>
 /// <param name="c">The creature to draw the viewing window for</param>
 private void drawCreatureView(Creature c)
 {
     drawBack();
     Simulation.getGraphicsDeviceManager().GraphicsDevice.SamplerStates[0] = SamplerState.PointWrap;
     spriteBatch.Begin(0, null, SamplerState.PointWrap, null, null);
     Texture2D tex = c.getDna().getTexture();
     Rectangle r = new Rectangle((Display.getWindowWidth() - 800) / 2 + 10, Display.getWindowHeight() - 130, 120, 120);
     spriteBatch.Draw(tex, r, Color.White);
     String title = "Creature";
     if (c.isStealthy())
     {
         title += " (hiding)";
     }
     string[] status = inputHandler.getCreatureInfo(c);
     Vector2 topLeft = new Vector2((Display.getWindowWidth() - 800) / 2 + 10 + 120 + 10, Display.getWindowHeight() - 130);
     spriteBatch.End();
     drawStrings(topLeft, title, status, 4);
 }