第一个程序
Jump C#代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Jump : MonoBehaviour {
public bool isJump = false;
public Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
if (Input.GetMouseButtonDown(0)) {
isJump = true;
anim.SetBool("Jump", true);
}
else if(Input.GetMouseButtonUp(0))
{
isJump = false;
anim.SetBool("Jump", false);
}
}
}
--------------------------The end----------------------------------------
你不关注一下吗?
热门评论
那个,可不可一分享一下素材,或者是直接发一下unitypackage文件