Exemplo n.º 1
0
    // Initializes everything.
    void Start()
    {
        SPINState = SPINEnum.Question0;
        DASSState = DASSEnum.Question0;

        DatabaseInserts.CreateSession(Constants.SURVEYS_SCENEID);

        reactionTimer = System.Diagnostics.Stopwatch.StartNew();

        data = new List <SurveyAnswerData>();
    }
Exemplo n.º 2
0
    // Move through the DASS survey until the end. Then start WSAP.
    private void DASSClick()
    {
        Debug.Log(reactionTimer.ElapsedMilliseconds / 1000.0 + " seconds");

        DASSState = DASSState.next();

        if (!DASSState.Equals(DASSEnum.END))
        {
            question.text = DASSState.GetQuestion();
            Debug.Log(DASSState.GetQuestion());

            reactionTimer.Reset();
            reactionTimer.Start();
        }
        else
        {
            Invoke("NextScene", COUNT_DOWN);

            running = false;
            countDownTimer.Start();
        }
    }
Exemplo n.º 3
0
 // Gets the next DASS state.
 public static DASSEnum next(this DASSEnum value)
 {
     return(Enum.GetValues(typeof(DASSEnum)).Cast <DASSEnum>()
            .SkipWhile(e => e != value).Skip(1).First());
 }
Exemplo n.º 4
0
 // Returns the DASS question.
 public static string GetQuestion(this DASSEnum value)
 {
     return(value.GetDASSAttribute <DASSAttribute>().Question);
 }