Example #1
0
    void Awake()
    {
        ad = GetComponent<AndroidDialogue> ();
        swipeAhead = Resources.Load("fx/swipe-ahead") as AudioClip;
        orit = new AudioClip[2];
        orit[0] = Resources.Load ("instructions/Please hold your phone horizontally for this game") as AudioClip;
        orit[1] = Resources.Load ("instructions/2sec_silence") as AudioClip;
        clips = new AudioClip[3];
        clips[0] = Resources.Load ("instructions/Swipe left to confirm") as AudioClip;
        clips[1] = Resources.Load ("instructions/2sec_silence") as AudioClip;
        clips[2] = Resources.Load ("instructions/2sec_silence") as AudioClip;

        total_num_agreements = AgreementTexts.transform.childCount;
        cur_text = 0;

        //load questions;
        questions = new string[3];
        questions [0] = "I am 18 or older.";
        questions [1] = "I have read and understand \nall the information presented earlier";
        questions [2] = "I want to participate this research \nand continue the game\n";

        string[] consentResult = Utilities.Loadfile ("consentRecord");
        int[] intResult = new int[1];
        if ((consentResult[0] != null)&&(consentResult != null)) {
            intResult = Array.ConvertAll<string, int>(consentResult, int.Parse);
            if(intResult[0] == 1)
                SceneManager.LoadScene("Title_screen");
        }
        gotoNextAgreement ();
    }
Example #2
0
    //eventHandler eh;

    void Awake()
    {
        URL_opened = false;
        android_window_displayed = false;
        ad = GetComponent <AndroidDialogue> ();

        string[] consentResult = Utilities.Loadfile("consentRecord");
        int[]    intResult     = new int[1];
        if ((consentResult[0] != null) && (consentResult != null))
        {
            intResult = Array.ConvertAll <string, int>(consentResult, int.Parse);
            if (intResult[0] == 1)
            {
                SceneManager.LoadScene("Title_screen");
            }
        }

        doneTesting = false;
        Utilities.initEncrypt();
    }
Example #3
0
    void Awake()
    {
        ad         = GetComponent <AndroidDialogue> ();
        swipeAhead = Resources.Load("fx/swipe-ahead") as AudioClip;
        orit       = new AudioClip[2];
        orit[0]    = Resources.Load("instructions/Please hold your phone horizontally for this game") as AudioClip;
        orit[1]    = Resources.Load("instructions/2sec_silence") as AudioClip;
        clips      = new AudioClip[3];
        clips[0]   = Resources.Load("instructions/Swipe left to confirm") as AudioClip;
        clips[1]   = Resources.Load("instructions/2sec_silence") as AudioClip;
        clips[2]   = Resources.Load("instructions/2sec_silence") as AudioClip;

        //total_num_agreements = AgreementTexts.transform.childCount;
        cur_text = 0;

        //load questions;
        questions     = new string[7];
        questions [0] = "I am 18 or older.";
        questions [1] = "Do you have normal vision\n or vision that is corrected to normal?";
        questions [2] = "Do you have visual impairment\n that can't be corrected by glasses?";
        questions [3] = "Are you blind?";
        questions [4] = "I have normal hearing.";
        questions [5] = "I have read and understand \nall the information presented earlier.";
        questions [6] = "I want to participate this research \nand continue the game.\n";

        string[] consentResult = Utilities.Loadfile("consentRecord");
        int[]    intResult     = new int[1];
        if ((consentResult[0] != null) && (consentResult != null))
        {
            intResult = Array.ConvertAll <string, int>(consentResult, int.Parse);
            if (intResult[0] == 1)
            {
                SceneManager.LoadScene("Title_screen");
            }
        }
        gotoNextAgreement();
    }
Example #4
0
 public InputTextFieldListner(AndroidDialogue d, AndroidJavaObject text)
     : base("android.content.DialogInterface$OnClickListener")
 {
     mDialog   = d;
     InputText = text;
 }
Example #5
0
 public PositiveButtonListner(AndroidDialogue d)
     : base("android.content.DialogInterface$OnClickListener")
 {
     mDialog = d;
 }
Example #6
0
 public PositiveButtonListner(AndroidDialogue d)
     : base("android.content.DialogInterface$OnClickListener")
 {
     mDialog = d;
 }