Log in or register to post comments

Event Trackable Behavior

May 20, 2019 - 8:55am #1

I would like my image behavior to end after a certain amount of time after not being recognized. but still then i would like to reactivate its behavior after a if I would like to .

 

        imageTarg = GetComponent<ImageTargetBehaviour>();

        countDownTimer();

    }

    void countDownTimer()

    {

        if (countDownStartValue > 0 && imageTarg.CurrentStatus == ImageTargetBehaviour.Status.NO_POSE)

        {

            Debug.Log("Timer : " + countDownStartValue);

            countDownStartValue--;

        }

        else if (imageTarg.CurrentStatus != TrackableBehaviour.Status.NO_POSE)

        {

            Debug.Log("Reset Timer");

            countDownStartValue = 10;  

        }

        else

        {

            Application.Quit();

        }

        Invoke("countDownTimer", 1f);

    }

    // Update is called once per frame

    void Update()

    {

        timer += Time.deltaTime;

    }

}

thanks for your eyes and frontal lobe powers...

Justin

Log in or register to post comments