This week I put a lot of work into animation and
making my enemy game objects perform different actions at certain distances. The
animation was fairly simple to pick up and use as I was using prebuilt prefabs
I gathered from the assets store in Unity3D already built with an animation
controller and animations.
The animations were performed using the
Animation.Play() and Animation.Stop() functions using several if statements to
determine when these functions should apply. Here is a link to the Unity
Scripting API if anyone is interested
In order to determine the distance from the
player to the enemy, I created a float using Vector3.Distance and using if
statements which check if the value of the distance is greater than a certain
number or below it. once again here is the link to the Unity Scripting API for
Vector3.Distance
Next week I expect to learn more about health and
scoring in my game and I will let you know my findings.

No comments:
Post a Comment