public class IO_touchTracker : MonoBehaviour {
// Uses NGUI event system to track touches
// Send details to objects
public GameObject plyer; // Player object to control
public behaviour_tapControl tapScript; // Player script to control
void Start(){
UICamera.fallThrough = this.gameObject;
print ("Name "+gameObject.name);
}
void OnPress (bool isPressed){
Debug.Log("I was pressed on!");
if (isPressed){
Debug.Log("player name"+plyer.name);
if (plyer != null){
tapScript.IO_Pressed (UICamera.lastTouchPosition);
}
// Send move command
}else{
Debug.Log("I was unpressed");
}
}
}