Hello all!
I'm trying to do some pretty unusual stuff with this really awesome engine, and till now I found a way to solve all every problem with a small amount of creativity or a large amount of forum-search
But now I'm stuck... It's 7am here in Germany and I've been trying to find a work-around for about 6 hours by now. So excuse my inevitable spelling and grammar fails
Well, the problem is, that I want a 2D actor to play a specific animation, while a key is pressed. So I thought, code should look like this (inside a "while"-loop):
if(Keyboard.IsKeyDown(VK_RIGHT))
{
actor.PlayAnimAsync("walk");
}
But nope. It doesn't work
I've varied the code a thousand times by now, but the "IsKeyDown" seems to make the animation freeze on the first frame, 'cause it is called again and again as long as I keep my finger on the key...
With a 3D actor, I would solve the Problem with a "actor.IsAnimPlaying" but this doesn't work for 2D actors
Please help me, or I will never get to sleep.......