예제 #1
0
    void Start()
    {
        rb2d        = GetComponent <Rigidbody2D> ();
        bleReceiver = new BleReceiver();
        bleReceiver.bindToService();

        // Request accelerometer data
        StartCoroutine(askForAccelData());
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        rb2d = gameObject.GetComponent <Rigidbody2D> ();

        bleReceiver = new BleReceiver();
        bleReceiver.bindToService();
        // Ask for force data with a delay. If a delay isn't used, the
        // request is ignored.
        StartCoroutine(askForForceData());
    }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        // Keep screen horizontal
        Screen.orientation = ScreenOrientation.LandscapeLeft;
        rb2d = gameObject.GetComponent <Rigidbody2D> ();

        bleReceiver = new BleReceiver();
        bleReceiver.bindToService();

        // Request accelerometer data
        StartCoroutine(askForAccelData());
    }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        // Keep screen horizontal
        Screen.orientation = ScreenOrientation.LandscapeLeft;
        rb2d           = GetComponent <Rigidbody2D> ();
        jumpForce      = new Vector2(100.0f, 100.0f);
        jumpInProgress = false;

        jumpNum = 0;

        guiStyle = new GUIStyle();

        bleReceiver = new BleReceiver();
        bleReceiver.bindToService();
        // Ask for force data with a delay. If a delay isn't used,
        // the request is ignored.
        StartCoroutine(askForForceData());
    }