示例#1
0
 public static SaferizeService Instance()
 {
     if (!instance)
     {
         instance = FindObjectOfType(typeof(SaferizeService)) as SaferizeService;
     }
     return(instance);
 }
示例#2
0
    void Start()
    {
        storedPINhash = SaferizeService.Instance().getSaferizeData().PINhash;

        if (storedPINhash != null)
        {
            PINInputPanel.SetActive(true);
            PIN1.ActivateInputField();
            SetupInputHandling();
        }
        else
        {
            NoPINInputPanel.SetActive(true);
        }
    }
示例#3
0
    void Awake()
    {
        _saferize = new Saferize(saferizePrivateKey.Trim(), saferizeUrl.Trim(), saferizeWebsocketUrl.Trim(), saferizeApiKey.Trim());

        if (instance == null)
        {
            instance = this;
            RegisterEventHandlers();
            loadSaferizeDataIntoMemory();
            createAppUserSession();
            DontDestroyOnLoad(gameObject);
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }
    }
    void Start()
    {
        _saferizeData = SaferizeService.Instance().getSaferizeData();
        if (_saferizeData != null)
        {
            emailControlText.text = "This app is managed by: \n" + _saferizeData.approval.ParentEmail;
        }

        if (_saferizeData != null && _saferizeData.approval.Status == SaferizeSDK.Approval.StatusEnum.PENDING)
        {
            BackToSignUp.SetActive(true);
        }
        else
        {
            SupportMessage.SetActive(true);
        }
    }
    public void StartParentalControlClicked()
    {
        errorLabel.gameObject.SetActive(false);

        if (!emailValidator.IsMatch(parentEmailInputField.text))
        {
            errorLabel.gameObject.SetActive(true);
            return;
        }

        if (token == null)
        {
            token = SystemInfo.deviceUniqueIdentifier;
        }
        ;

        SaferizeService.Instance().SignUp(parentEmailInputField.text, token);
        InputContainer.SetActive(false);
        ThanksContainer.SetActive(true);
    }
 public void CloseSaferize()
 {
     SaferizeService.Instance().CloseSaferizeParents();
 }
示例#7
0
 void Awake()
 {
     SaferizeService.Instance().ClearSaferizeData();
 }
示例#8
0
 public void RemoveDatFile()
 {
     SaferizeService.Instance().ClearSaferizeData();
 }
示例#9
0
 public void OpenSaferize()
 {
     SaferizeService.Instance().OpenSaferizeParents();
 }
示例#10
0
 void OnEnable()
 {
     ThankYouText.text = "Instructions have been sent to: \n\n" + SaferizeService.Instance().getSaferizeData().parentEmail + "\n\nPlease check your email for details!";
 }
 public void ExitPanel()
 {
     SaferizeService.Instance().CloseSaferizeParents();
 }
 public void backToSignUp()
 {
     SaferizeService.Instance().OpenSignUpPanel();
 }