Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK .NET / Problems with the AnimatedSprite class

Author
Message
Interplanetary Funk
13
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 26th Feb 2012 17:15
The AnimatedSprite class doesn't seem to draw anything to the screen. I can't figure out why, and there doesn't seem to be any examples using for the AnimatedSprite class.
An example which I cannot get to work:

Any help would be immensely appreciated.

jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 26th Feb 2012 19:52
Could you post the full example for download ? It would be much easier to trouble shoot with all the code.

" The best slaves are the ones who think they are free. "
Interplanetary Funk
13
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 26th Feb 2012 20:46 Edited at: 26th Feb 2012 20:52

Is literally all I'm trying to do at the moment.

It might also be worth mentioning that I'm using visual c# 2010. It compiles fine and static sprites work 100%.

Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 27th Feb 2012 05:00
Each time your loop begins again, you need to tell it what to draw and where. Using the Paste method will give your sprite a place to live on the screen when the sync is executed.

Interplanetary Funk
13
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 27th Feb 2012 20:58 Edited at: 27th Feb 2012 20:58
Well now it's on screen, I also found out that using AnimatedSprite.Position worked. However, it's not animating.
Both the pieces of code below display the sprite, but neither animate it:




Login to post a reply

Server time is: 2024-03-29 10:53:17
Your offset time is: 2024-03-29 10:53:17