Exemplo n.º 1
0
 public void Start()
 {
     manager = GetComponent <NetworkingManager>();
     loginCreatureComforts = FindObjectOfType <LoginCreatureComforts>();
     DontDestroyOnLoad(this.gameObject);
     manager.Connect();
 }
Exemplo n.º 2
0
    void OnGUI()
    {
        if (GUI.Button(new Rect(Screen.width / 2 - 50, Screen.height / 2 + 50, 100, 100), "Play"))
        {
            if (!Application.isEditor && !FB.IsLoggedIn)
            {
                FB.Login("public_profile", OnLogin);
            }
            else
            {
                if (!NetworkingManager.Connected)
                {
                    NetworkingManager.Connect();
                }

                Application.LoadLevel("Lobby");
            }
        }
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        if (!NetworkingManager.Connected)
        {
            NetworkingManager.Connect();
        }

        NetworkingManager.MessageReceived += networkingManager_MessageReceived;

        ScoreText.text = ScoreManager.LatestScore.ToString();
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        if (!NetworkingManager.Connected)
        {
            NetworkingManager.Connect();
        }

        NetworkingManager.MessageReceived += networkingManager_MessageReceived;

        UserText.text = UserManager.Name;
        StartCoroutine("LoadProfilePicture", UserPictureTexture);
    }