Quantcast
Channel: Questions in topic: "gun"
Viewing all articles
Browse latest Browse all 592

How do I restart and stop this animator

$
0
0
I am trying to make a shooter game and I have a gun that is constantly firing and I have made the animation stop however I need it to start for it to fire once when the left mouse is clicked and stop the animation until it is clicked again. Here is the code: Animator ani; // Use this for initialization void Start () { ani = GetComponent (); ani.Stop (); } (with out this the gun will constantly fire.) (Sorry I am a unity noob and am no good with code.)

Viewing all articles
Browse latest Browse all 592

Trending Articles



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