Exemplo n.º 1
0
    public ProfileHUDController()
    {
        view      = UnityEngine.Object.Instantiate(Resources.Load <GameObject>("ProfileHUD")).GetComponent <ProfileHUDView>();
        view.name = "_ProfileHUD";

        view.buttonLogOut.onClick.AddListener(WebInterface.LogOut);
        view.buttonClaimName.onClick.AddListener(() => WebInterface.OpenURL(URL_CLAIM_NAME));

        ownUserProfile.OnUpdate += OnProfileUpdated;
    }
Exemplo n.º 2
0
    public ProfileHUDController()
    {
        mouseCatcher = InitialSceneReferences.i?.mouseCatcher;

        view      = UnityEngine.Object.Instantiate(Resources.Load <GameObject>("ProfileHUD")).GetComponent <ProfileHUDView>();
        view.name = "_ProfileHUD";

        view.buttonLogOut.onClick.AddListener(WebInterface.LogOut);
        view.buttonClaimName.onClick.AddListener(() => WebInterface.OpenURL(URL_CLAIM_NAME));

        ownUserProfile.OnUpdate += OnProfileUpdated;
        if (mouseCatcher != null)
        {
            mouseCatcher.OnMouseLock += OnMouseLocked;
        }
    }