Created
April 3, 2015 11:50
-
-
Save enpel/4bd075fffaed56db724c to your computer and use it in GitHub Desktop.
NGUI UIButton をロングタップ対応
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[RequireComponent(typeof(UIButtonLongTapComponent))] | |
public class ButtonComponent : MonoBehaviour | |
{ | |
void Awake() | |
{ | |
this.gameObject.GetComponent<UIButtonLongTapComponent>().SetButtonAction(OnShortTapButton, OnLongTapItemButton, true); | |
} | |
public void OnShortTapButton() | |
{ | |
// Tap時のしょり | |
} | |
public void OnLongTapItemButton() | |
{ | |
// ロングタップ時の処理 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment