Esempio n. 1
0
    // Destroy ourself and invoke reward when the next input event occurs
    void Update()
    {
        if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1))
        {
            FGLEditorInternals.GrantReward();
            Destroy(gameObject);
            return;
        }

        if (Input.touchCount > 0)
        {
            if (Input.GetTouch(0).phase == TouchPhase.Began)
            {
                FGLEditorInternals.GrantReward();
                Destroy(gameObject);
                return;
            }
        }
    }