Пример #1
0
    void Start()
    {
        ball = this.transform.Find("Ball").gameObject;
        rope = this.transform.Find("Rope").gameObject;

        controller = GetComponent <PendulumController> ();

        rb = ball.GetComponent <Rigidbody> ();
    }
Пример #2
0
    void Start()
    {
        connection = new WebGestureDetection();
        connection.connectAsync();

        lastConnectionAttempt = 0;
        connectionAttempts    = 0;

        lastFrame       = -1;
        lastGestureTime = 0;

        connection.swipeSpeed           = speeds.swipe;
        connection.raiseOpenPalmSpeed   = speeds.raiseOpenPalm;
        connection.dropOpenPalmSpeed    = speeds.dropOpenPalm;
        connection.allHandSwipeSpeed    = speeds.allHandSwipe;
        connection.allHandPinchSpeed    = speeds.allHandPinch;
        connection.twoFingersSwipeSpeed = speeds.twoFingersSwipe;

        errorAudio         = GetComponent <AudioSource> ();
        pendulumController = GetComponent <PendulumController> ();
    }