Exemplo n.º 1
0
 public void Unlock()
 {
     if (qstate == QUESTIONSTATE.WAITING)
     {
         qstate = QUESTIONSTATE.NONE;
     }
 }
Exemplo n.º 2
0
    protected override void ProcessQuestionInput(JOYSTICKBUTTON button)
    {
        switch (button)
        {
            case JOYSTICKBUTTON.JUMP:
                {
                    qstate = QUESTIONSTATE.WAITING;
                    currentQZone.GetComponent<QuestionZone>().SubmitAnswer(0, JoyStickNum - 1);

                    print("A");

                    break;
                }
            case JOYSTICKBUTTON.FIRE:
                {
                    qstate = QUESTIONSTATE.WAITING;
                    currentQZone.GetComponent<QuestionZone>().SubmitAnswer(1, JoyStickNum - 1);

                    print("B");

                    break;
                }
            default:
                break;
        }
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (qstate == QUESTIONSTATE.INTRO)
        {
            introTime += Time.deltaTime;

            if (introTime > 2.0f)
            {
                print("Intro Done.");
                qstate = QUESTIONSTATE.INPUT;
                introTime = 0.0f;
            }
        }
        else if (qstate == QUESTIONSTATE.INPUT)
        {
            base.UpdateQuestionInput();
        }
        else if(qstate == QUESTIONSTATE.NONE)
        {
            base.UpdateInput();

            Shoot();
        }
    }
Exemplo n.º 4
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "QuestionZones")
        {
            if (!other.gameObject.GetComponent<QuestionZone>().used)
            {
                if (qstate == QUESTIONSTATE.NONE)
                {
                    currentQZone = other.gameObject;

                    currentQZone.GetComponent<QuestionZone>().inited = true;

                    qstate = QUESTIONSTATE.WAITING;
                }
            }
        }
        else if (other.gameObject.tag == "EndLevel")
        {
            Application.LoadLevel(4);
        }
    }