Game Architecture

后端 未结 4 1534
抹茶落季
抹茶落季 2020-12-07 17:58

I have a question about a XNA game I\'m making, but it is also a generic question for future games. I\'m making a Pong game and I don\'t know exactly what to update where, s

4条回答
  •  甜味超标
    2020-12-07 18:53

    I agree with what Andrew said. I am just learning XNA as well and in my classes, for example your ball class. I'd have an Update(gametime) method and a Draw() method in it at the least. Usually an Initialize(), Load() as well. Then from the main game class I will call those methods from their respective cousins. This was before I learned about GameComponent. Here is a good article about if you should use that. http://www.nuclex.org/blog/gamedev/100-to-gamecomponent-or-not-to-gamecomponent

提交回复
热议问题