NestorTejero / ES2016A

VideoJoc Curs Enginyeria Software 2016 - grup A de pràctiques (dijous)
https://nestortejero.github.io/ES2016A/
GNU General Public License v3.0
2 stars 0 forks source link

Integrate attack animations #181

Closed sdiaz7 closed 7 years ago

sdiaz7 commented 7 years ago

Integrate attack animations into the new Enemy Behaviour.

Definition of DONE:

This issue condensates and redefines tasks placed at #165 , #66 and #67 . Assignees moved to this new issue.

Branch: dev_Issue181

Time estimated: 2 hours

sdiaz7 commented 7 years ago

As provided by @Nerucius , this line of code might be useful for implementing attack animation:

GetComponent<Animator>().SetTrigger("atack");

Nerucius commented 7 years ago

Status report Due to the latest developments of 'EnemyBehavior` all that is left of this issue is trigger the animation when atacking and triggering back walking when done attacking.

sdiaz7 commented 7 years ago

Since I am working on enemy scripts and prefabs, I am going to fix enemies not looking to the target when spawned.

sdiaz7 commented 7 years ago

Attack animation is now displayed once the enemy starts attacking. Oddly, the animation coexists with the walking one through the attack. I am currently investigating why this is happening.

sdiaz7 commented 7 years ago

To ensure that animator stays in a state of animation for an undefined period of time, the controller's transitions have to look something like this: image

sdiaz7 commented 7 years ago

Pull request opened for review: #191

sdiaz7 commented 7 years ago

Pull request accepted and merged into DEV. Issue closed and moved to DONE.