c# - DrawableGameComponent XNA, Implementation Right way? -
So I've been googling / binging to find answers on this, but drawing spaces. If I want to play a level game with different properties for each level, then I will do something like
public class level: DrawableGameComponent {} // Somewhere inside functions or we have the level of var = New level (this, "Level1"); Components.Add (level)); // Player level wins components Remove (level)); Level = New Level (this, "Level 2"); Components.Add (level);
How it is done, I looked at the platform kit which is provided for XNA 3.1 and level class, but did not implement DrawableGameComponent and to copy the same functionality decision made.
This is a a path and is a good way to use DrawableGameCompenents is. But this is not the only way or the best way that there is nothing wrong with that approach for your levels and if you are going to use DrawableGameComponents, then definitely to use them at a higher level For example, ask each character and tile on your screen for example, a DrawableGameComponent
I never use them personally, as much as Like a platform kit, I want to create my own class and imagine imitative games. But in a way the other is not necessarily better.
Apart from this, as a side note, while Stack Overflow is a fantastic site for Q & A, you still ask the fastest and best responses to members on XNA forums, and often the Microsoft XNA Framework Developers themselves jump to answer questions.
Comments
Post a Comment