Doctors Notes > Moodlight problems

I've had a look at the code and the problem is not that you have done much wrong, but that what you have done is in the wrong place.

The idea is that a class contains Update and Draw methods. XNA creates a class called Game1 and puts empty Update and Draw methods in it. To make the Moodlight work you just have to add some data to the Game1 class (the intensity values) and then put code into Draw and Update to work with these variables.

What you have done is put the methods and the data in, but in the wrong places. You have to be ultra careful about preserving the structure of the class, otherwise the compiler gets very upset and gives loads of errors which can be very hard to understand.

I'll put a tidied up version of the code up on the recovery room.

September 5, 2008 | Registered CommenterRob

That explains the problems I had. Thank you Mr. Miles!

December 5, 2009 | Unregistered CommenterModeltrainman