Quantcast
Channel: Questions in topic: "stopping-animation"
Viewing all articles
Browse latest Browse all 60

if (Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.LeftShift)) with , PlayMode.StopAll);????

$
0
0
**It says something about ints in error log, but i thought this worked in older unity c# correct me if i am wrong i need to get around this it is driving me mad i cannot find any links for c#, hope full using ints isn't the only way because i have no idea how to work them(error log: error CS1503: Argument `#2' cannot convert `UnityEngine.PlayMode' expression to type `int')** thanks in advance! public class PlayerAnimations : MonoBehaviour { private Animator PlayerAnimator; void Start () { PlayerAnimator = GetComponent(); } // Update is called once per frame void Update () { if (Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.LeftShift)) { PlayerAnimator.Play("Run", PlayMode.StopAll); PlayMode.StopAll; } else if (!Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.LeftShift)) { PlayerAnimator.Play("Idle"); } if (Input.GetKey(KeyCode.W)) { PlayerAnimator.Play("Walk", PlayMode.StopAll); } } }

Viewing all articles
Browse latest Browse all 60

Trending Articles



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