Skip to content

Instantly share code, notes, and snippets.

@lycoris102
Created July 25, 2016 13:21
Show Gist options
  • Save lycoris102/ee8e5ed2c39a74630a018d08a6cd06b6 to your computer and use it in GitHub Desktop.
Save lycoris102/ee8e5ed2c39a74630a018d08a6cd06b6 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(ButtonExtention))]
public class ButtonAction : MonoBehaviour
{
void Start()
{
var button = GetComponent<ButtonExtention>();
button.onClick.AddListener(() => Debug.Log("Click!!"));
button.onLongPress.AddListener(() => Debug.Log("LongPress!!"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment