Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

play a death animation when a the gameobject is destroyed But Please I want it JS Script

$
0
0
Thats My Script and when i kiil my enemy its not playing the animation ! _______________________________________________________________________________________________ #pragma strict var Health = 100; var animDie : AnimationClip; // Drag your animation from the project view in here (to inspector) function ApplyDammage (TheDammage : int) { Health -= TheDammage; if(Health <= 0) { Dead(); } } function Dead() { GetComponent.().Play(animDie.name); Destroy(this.gameObject, animDie.length); }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>