Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When manually setting the drawing order of game components by setting

int DrawableGameComponent.DrawOrder

can one use any integer numbers as long an order is defined like

  • component1 => drawing order: 2
  • component2 => drawing order: 5
  • component3 => drawing order: 10
  • component4 => drawing order: 323

or do these integers have to be consecutive and starting with zero like

  • component1 => drawing order: 0
  • component2 => drawing order: 1
  • component3 => drawing order: 2
  • component4 => drawing order: 3

?

share|improve this question

It can be anything

This value can be any integer. Components in the GameComponentCollection are drawn in ascending order based on their DrawOrder.

http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.drawablegamecomponent.draworder.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.