using UnityEngine;
using System.Collections;
public class CustomVirtualButtonEventHandler : MonoBehaviour , IVirtualButtonEventHandler {
// Use this for initialization
void Start () {
VirtualButtonBehaviour[] vbs = GetComponentsInChildren ();
for (int i = 0; i < vbs.Length; ++i) {
vbs .RegisterEventHandler (this);
}
}
public void update(){
}
public void OnButtonPressed( VirtualButtonAbstractBehaviour vb ){
Debug.Log (vb.VirtualButtonName+ " pressed");
}
public void OnButtonReleased( VirtualButtonAbstractBehaviour vb ){
Debug.Log(vb.VirtualButtonName+ " released" );