Drawing order in XNA

Posted by marc wellman on Game Development See other posts from Game Development or by marc wellman
Published on 2012-11-02T14:02:43Z Indexed on 2012/11/02 17:33 UTC
Read the original article Hit count: 292

Filed under:
|

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

?

© Game Development or respective owner

Related posts about XNA

Related posts about c#