Skip to content

Instantly share code, notes, and snippets.

@smallrice45
Created March 19, 2014 16:31
Show Gist options
  • Save smallrice45/9645583 to your computer and use it in GitHub Desktop.
Save smallrice45/9645583 to your computer and use it in GitHub Desktop.
NGUI 按鈕觸發
using UnityEngine;
using System.Collections;
public class NGUIButtonEvent : MonoBehaviour {
void OnPress(bool isPress)
{
if(isPress)
{
print("按鈕按下");
}else{
print("按鈕放開");
}
}
void OnClick()
{
print(按鈕點擊);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment