Sign in to follow this  
SoftLogic

Components List

Recommended Posts

Hey guys, I've just started learning C# after my programmer decided to move away, leaving me with a shed-load of work to do. A problem I've got at the moment is with the book I'm reading (Novice to Professional XNA from Apress) is full of bugs, bits missed out, etc. For the most part I've been smart enough to fix the problems as I went, but right now I'm stuck. I'm trying to include a component with Game.cs called Ship.cs, and the book mentions including the component in the game component's list. I have attempted to find such a list, and many different things yet to little avail. A hint or push in the right direction here would be very handy. Thanks in advance.

Share this post


Link to post
Share on other sites
The Game class has an attribute called Components, which is a collection. Any components you need to run each frame should be added to that collection e.g. Components.Add(myComponent)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this