c#
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4 5public class AllosaurusController : MonoBehaviour { 6 7 8 private Animator animetor; 9 // Use this for initialization 10 void Start () { 11 animetor = GetComponent<Animator>(); 12 } 13 14 // Update is called once per frame 15 void Update () 16 { 17 if (Input.GetKey (KeyCode.W)) { 18 transform.position += transform.forward * 0.1f; 19 animetor.SetBool ("is running", true); 20 } else { 21 animetor.SetBool ("is running", false); 22 } 23 if (Input.GetKey (KeyCode.Space)) { 24 animetor.SetBool ("is jump", true); 25 } else { 26 animetor.SetBool ("is jump", false); 27 } 28 } 29} 30
この、jumpの動作なのですが、長押しをせずに一回だけ押すと、途中で止まってしまいます。
長押しをしたら、全部再生されます。
解決方法はありませんか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。