Example #1
0
    void FixedUpdate()
    {
        state = gameObject.GetComponent <VLTrackedObjectBehaviour>().previousState;

        switch (state)
        {
        case "tracked":
            counter++;
            break;

        case "critical":
            break;

        case "lost":
            counter = 0;
            break;

        default:
            counter = 0;
            break;
        }

        if (counter == TARGET)
        {
            listComponent.SetRecognized();
        }
    }