Exemplo n.º 1
0
    public void Start()
    {
        lastPosition  = transform.position;
        lastYPosition = transform.position;

        ProfileSessionManager.GetUserWeight();
        weight = ProfileSessionManager.curPlayerWeight;

        if (weight == 0)
        {
            weight = 80;
        }

        centralSensor = GameObject.Find("DemoUI").GetComponent <CentralSensor>();
        //centralSensor = GameObject.FindWithTag("USERUI").GetComponent<CentralSensor>();
        fed = GameObject.Find("FitnessEquipmentDisplay").GetComponent <FitnessEquipmentDisplay>();


        /* if (fed.connected == true)
         * {
         *   InvokeRepeating("CheckSlopeGrade", 5.0f, 0.5f);
         *
         * }
         */
    }
Exemplo n.º 2
0
    // CountdownVeloDrome countdownVeloDrome;

    /*public GameObject knockOutUI;
     * public GameObject knockOutManager;
     * public GameObject knockOutButton;
     * public KnockoutModeManager knockManagerList;
     */

    /// <summary>
    /// Start is called on the frame when a script is enabled just before
    /// any of the Update methods is called the first time.
    /// </summary>
    void Start()
    {
        serverWindow   = GameObject.Find("DemoUI/NetworkPanel");
        messageWindow  = GameObject.Find("DemoUI/MessagePanel");
        connectionText = GameObject.Find("DemoUI/NetworkMessage").GetComponent <Text>();
        username       = GameObject.Find("DemoUI/NetworkPanel/PlayerNameInputField").GetComponent <InputField>();
        roomName       = GameObject.Find("DemoUI/NetworkPanel/RoomNameInputField").GetComponent <InputField>();
        roomList       = GameObject.Find("DemoUI/NetworkPanel/RoomListInputField").GetComponent <InputField>();
        messagesLog    = GameObject.Find("DemoUI/MessagePanel/MessageLog").GetComponent <InputField>();
        pairScreen     = GameObject.Find("DemoUI/Pairing");
        SPPlayer       = GameObject.Find("Bicycle");
        //  knockOutUI = GameObject.Find("DemoUI/KnockOutModeUI");
        //  knockOutButton = GameObject.Find("DemoUI/NetworkPanel/KnockOutModeButton");
        //RPS
        /*RPS_Storage*/ storageScript = GameObject.Find("RPS_Storage").GetComponent <RPS_Storage>();
        //  knockOutUI.SetActive (false);
        //  knockOutButton.SetActive(false);
        TimeAttackCountdown = GameObject.Find("CountDownManager");



        GameObject rootGO = GameObject.Find("SpawnPointers");

        spawnPoints = new Transform[rootGO.transform.childCount];

        for (int i = 0; i < rootGO.transform.childCount; i++)
        {
            spawnPoints[i] = rootGO.transform.GetChild(i);
        }
        messages = new Queue <string>(messageCount);

        if (PlayerPrefs.HasKey(nickNamePrefKey))
        {
            // username.text = PlayerPrefs.GetString(nickNamePrefKey);
            ProfileSessionManager.GetUsername();
            username.text = ProfileSessionManager.curName.ToString();
        }
        PhotonNetwork.AutomaticallySyncScene = true;
        PhotonNetwork.ConnectUsingSettings();
        connectionText.text = "Connecting to lobby...";
    }