using UnityEngine;
using System.Collections;
public class danji : MonoBehaviour {
bool a;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnMouseUp()
{
CancelInvoke ();
a = false;
}
void OnMouseDown(){
a = true;
// Invoke ("cc",1);
InvokeRepeating ("cc",2,0.3f);
}
void OnMouseDrag()
{
transform.position += new Vector3(0,4,0);
}
void cc()
{
Debug.Log ("hehe!");
}
}
InvokeRepeating简单实用
最新推荐文章于 2024-01-02 09:34:09 发布