Inheritance: MonoBehaviour, IPointerDownHandler
Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("Adding to press");
        press   += StartDrawing;
        release += StopDrawing;
        move    += Move;

#if UNITY_EDITOR || UNITY_STANDALONE_WIN
        handleInput += _MouseInputHandler;
#elif UNITY_ANDROID
        handleInput += _TouchInputHandler;
#endif
    }
Exemplo n.º 2
0
 /// <summary>
 /// Initialize a new button instance.
 /// </summary>
 /// <param name="text">Button label</param>
 /// <param name="pressHandler">Event handler for button presses</param>
 public Button(string text, PressHandler pressHandler)
 {
     Text     = text;
     OnPress += pressHandler;
 }