- 最后登录
- 2014-10-23
- 注册时间
- 2011-7-19
- 阅读权限
- 90
- 积分
- 81303
 
- 纳金币
- -1
- 精华
- 11
|
准备进入下一部分的制作。Firstly we check to see if frameNumber has reached the end of the animation, we then check to see if
the enemy is still close to the player, if we are still close reset the animation to play from the beginning.
But if we are far away from the player go and play our walk animation, keep in mind that previous I
had it set to the stand animation here. If the alien is always walking or meleeing it will never actually
play the stand animation, in this old case the stand animation would have played for one frame before
being set to the walk animation, I changed it back here to the walk animation to make the transition
from the end of the melee animation straight to the walk animation for a better transition.
Now we have enemies that will chase the player and attack near proximity. Right now there is no
damage being applied to the player when this happens, and we could add a bit of a push back that
happens when the enemy hits a player. We will cover these things in a later tutorial. For now our next
tutorial is to add weapons so that the player can shoot and destroy the aliens.
Don't Forget to save your scene Goto > File > Save Scene.
Time to implement projectiles!
uke翻译整理,出处:unity3d8.com
|
|