次の方法で共有


XNAExtras build 0923 release

Major addition for this version: collision detection has been added to XSpriteManager. Both bounding box and pixel based (mix-n-match sprites of different types). Also boundary collisions. These are demoed in the bouncy CollisionDemo example:

From the release notes:

(BMFontGen) Fixed bug where including undefined chars in your font -range would cause a crash
(BitmapFont) Changed loading embedded resources - now the resource name is specified in the same format as file-based resources
(BitmapFont) Fixed bug where font files wouldn't be found unless they were in a subdirectory
(TextBox) Added accessors for the text string
(XSpriteManager) Changed default FPS to 60
(XSpriteManager) Added support for collisions
(TexturePool) *Really* fixed bug in AddTexture(string,Color) where the texture wasn't being created if the GraphicsDevice already existed - the fix got lost for the last release

Thanks to redwyre, David Zakar (DMZ), Martin Szinger and Matt Moore for comments/suggestions.

You can download the 0923 build of XNAExtras here.

Comments

  • Anonymous
    September 25, 2006
    The comment has been removed

  • Anonymous
    September 25, 2006
    Thanks for your help. Seems also that you need to have a LoadResources method of some sort to reload the font, after adding that method, and making sure the font files are loaded into the output directory, everything started working fine. The full path also seems to function properly as well.

    On a different subject(kinda): do you know of any free scripting tools that would help in development of a RPG?

    Thanks again for your help! [I'm glad that you got it working. Re: tools for developing RPGs. There are some RPG contruction kits out there, but aside from that I'm not aware of anything. Sorry. -GaryKac]

  • Anonymous
    September 26, 2006
    The comment has been removed

  • Anonymous
    September 27, 2006
    PingBack from http://www.xnatutorial.com/?p=19

  • Anonymous
    October 08, 2006
    Gary, I've been playing around with XSpriteManager as a way of handling menu backgrounds, bitmap buttons that highlight when selected (via frames) etc. So far it all looks nice. My plan was to have one sprite manager that loaded all menu resources for all pages. Each of my menu pages would implement Draw(), and only draw the sprites (and background) it was responsible for. However, XSprite::Draw needs a SpriteBatch, which is not accessible from the SpriteManager. Does this sound like a fair application of XSpriteManager (and therefore, do you think making a SpriteBatch accessor is a sensible idea)? That was way more than I wanted to write, but thanks anyway for XNAExtras - I'm using it and enjoying it. [I'm not sure I completely understand your how you've structured things but my approach would be to either: 1) Have separate XSpriteManagers and draw only the ones that are active - ie. each menu page would have it's own SpriteManager which is drawn only when the menu page is active. 2) Have a single XSpriteManager and have the menu pages enable/disable the individual elements. If you're trying to draw the XSprites manually, then you'll probably end up drawing them twice, because the XSpriteManager will be drawing them as well. Does this make sense? -GaryKac]