예제 #1
0
파일: GUIHandler.cs 프로젝트: potray/TFM
    public void Start()
    {
        HideButton(confirmButton);
        playerId = -1;

        // Get Leap Motion info.
        controller = new LeapMotionHandControl();
        controller.Init();

        loginCanvasHiddenByController = false;
        selectGameCanvasHiddenByController = false;

        // Show warning if device isn't connected.
        if (!controller.DeviceConnected())
        {
            warningText.text = "Please connect the Leap Motion device to your computer.";
            loginCanvas.gameObject.SetActive(false);
            deviceWasDisconnectedAtStart = true;
        }
        else
        {
            deviceWasDisconnectedAtStart = false;
        }

        // Show the load level screen if the player played a level before.
        if (PlayerPrefs.GetInt("LoadLevel") == 1)
        {
            PlayerPrefs.SetInt("LoadLevel", 0);
            loginCanvas.gameObject.SetActive(false);
            selectGameCanvas.gameObject.SetActive(true);
            LoadPlayerPrefs();
            ChangeButtons();
        }
    }
예제 #2
0
파일: SimonSays.cs 프로젝트: potray/TFM
    // Use this for initialization
    void Start()
    {
        // Set up controller.
        controller = new LeapMotionHandControl();
        controller.Init();

        // Show a warning message if the device isn't connected. Show instructions when the device is connected.
        if (!controller.DeviceConnected())
        {
            text.text = connectDevice;
        }

        maxHooks = PlayerPrefs.GetInt("SimonSaysHandMaxHooks");

        Init();

        if (Settings.debug)
            url = debugurl;
    }
예제 #3
0
파일: StraightLine.cs 프로젝트: potray/TFM
    void Start()
    {
        // Set up controller.
        controller = new LeapMotionHandControl();
        controller.Init();

        // Set up instructions text.
        text.text = begginingInstructions;
        previousText = begginingInstructions;

        // Set up start and end transform so we avoid checking them every time.
        startPosition = start.transform.position;
        endPosition = end.transform.position;

        time = 0;
        indexPositions = new List<Vector3>();
        times = new List<double>();

        if (Settings.debug)
            url = debugurl;
    }