我想把球员放下来 [英] I woud like to make the player duck down
问题描述
大家好!
我开始玩2D XNA游戏,我想让玩家瘫痪。我已经有动画,但我需要让他下来。动画的代码如下...感谢您的关注!
protected override void UpdateAnimations()
{
if(currentAnimation == null)
return;
base.UpdateAnimations();
if(velocidade!= Vector2.Zero || jumping == true)
{
if(direcao.X< 0&& AnimationIsNot( Animations.RunRight))
ChangeAnimation(Animations.RunRight);
else if(direcao.X> 0&& AnimationIsNot(Animations.RunLeft))
ChangeAnimation(Animations.RunLeft);
}
else if(velocidade == Vector2.Zero || jumping == false)
{
if(direcao.X< 0&& AnimationIsNot(Animations。 IdleRight))
ChangeAnimation(Animations.IdleRight);
else if(direcao.X> 0&& AnimationIsNot(Animations.IdleLeft))
ChangeAnimation(Animations.IdleLeft);
}
Hi Lomba_77,
欢迎来到MSDN论坛。
根据您的代码和描述,似乎与c#相关,以满足您的需求。由于我们的论坛主要关注VS
IDE问题,我建议您重定向到
VS语言论坛并开始一个新线程以获得更好的支持。
感谢您的理解。
最好的问候
May &NBSP;&NBSP; 跨度>
Hello everyone!
I began a game 2d XNA and I woud like to make the player duck down. I have already the animation but I need to make him get down. The animation's code are bellow... Thank you for your attention!
protected override void UpdateAnimations() { if (currentAnimation == null) return; base.UpdateAnimations(); if (velocidade != Vector2.Zero || jumping == true) { if (direcao.X < 0 && AnimationIsNot(Animations.RunRight)) ChangeAnimation(Animations.RunRight); else if (direcao.X > 0 && AnimationIsNot(Animations.RunLeft)) ChangeAnimation(Animations.RunLeft); } else if (velocidade == Vector2.Zero || jumping == false) { if (direcao.X < 0 && AnimationIsNot(Animations.IdleRight)) ChangeAnimation(Animations.IdleRight); else if (direcao.X > 0 && AnimationIsNot(Animations.IdleLeft)) ChangeAnimation(Animations.IdleLeft); }
Hi Lomba_77,
Welcome to the MSDN forum.
Based on your code and description, it seems be related with c # to impelement this your requrienment. Since our forum mainly focus on VS IDE issue, i recommend you redirect to the VS language forum and start a new thread for a better supporting.
Thank you for your understanding.
Best Regards
May
这篇关于我想把球员放下来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!