You're talking about the same concept - just with the up and down animations? Just use the same logic and add the checks for Position.Y and oldPosition.Y
So instead, it would be like...
//Refer to previous code under AnimationCheck() Method
//Right after the X comparisons... change the if (this.position.X == oldPosition.X) to
else if (this.position.X == oldPosition.X && this.position.Y == oldPosition.Y)
{
if (this.TextureUsed != blah blah blah) //if he isn't walking at all
{
InitializeStop(); //make him stop
}
else if (this.TextureUsed != blah blah blah) //if he isn't waiting and done stopping
{
InitializeWait(); // make him wait
}
}
else if (this.position.Y > oldPosition.Y)
{
if (this.TextureUsed != blah blah blah) //if he isn't walking Down
{
InitializeWalkDown(); //make him walk down
}
//You probably wont have to mess with SpriteEffects on these because
//you'll probably have 2 different textures for up and down animations.
}
else if (this.position.Y < oldPosition.Y)
{
if (this.TextureUsed != blah blah blah) //if he isn't walking up
{
InitializeWalkUp(); //make him walk up
}
//Same deal as before on SpriteEffects
}
I havent used the up and down animation code, but that should give you an idea on the logic of it. It's really the same thing as the animations for left and right.. just add the top and bottom ones as well... and checking for different textures that are used.
Let me know if this is what you wanted. Hopefully it helps!
------------------------------
their != there != they're
------------------------------