// Update is called once per frame

    void Update()
    {
        if (!isDemo)
        {
            if (Input.GetKeyDown(KeyCode.Space))
            //if(OVRInput.GetDown(OVRInput.Button.One))
            {
                if (!started)
                {
                    started = true;

                    currentStage  = EXP_STAGE.TUTORIAL;
                    stagesDone[0] = true;

                    notificationsMannager.lightStepNotification(1);

                    if (notificacionTextObject != null)
                    {
                        TextMesh text = notificacionTextObject.GetComponent <TextMesh>();
                        text.text = "TUTORIAL";
                    }

                    if (persistanceManager != null)
                    {
                        persistanceManager.saveGeneral();
                    }
                    else
                    {
                        Debug.LogError("PersistanceMannager missing!!! No results reported");
                    }
                    //Call persistance to update
                }
                else
                {
                    nextStage();
                }

                trackerMannager.setTrackers();
            }
            else if (Input.GetKeyDown(KeyCode.R))
            {
                setNew();
                notificationsMannager.normalSettings();
                persistanceManager.recording = false;

                GameObject leftProp = GameObject.Find("LeftProp");
                if (leftProp != null)
                {
                    leftProp.GetComponent <PropController>().angleNumber = 0;
                }

                GameObject rightProp = GameObject.Find("RightProp");
                if (rightProp != null)
                {
                    rightProp.GetComponent <PropController>().angleNumber = 0;
                }
            }
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        persistanceManager    = gameObject.GetComponent <PersistanceManager>();
        trackerMannager       = gameObject.GetComponent <TrackerMannager>();
        notificationsMannager = gameObject.GetComponent <NotificationsMannager>();
        surveyMannager        = gameObject.GetComponent <SurveyMannager>();
        logic = gameObject.GetComponent <Logic>();

        surveyActivated = false;

        if (!isDemo)
        {
            setNew();
        }
        else
        {
            currentStage = EXP_STAGE.PROP_MATCHING_PLUS_RETARGETING;
            notificationsMannager.lightStepNotification(1);
            started = true;
            if (notificacionTextObject != null)
            {
                TextMesh text = notificacionTextObject.GetComponent <TextMesh>();
                text.text = "Welcome!!";
            }
            if (persistanceManager != null)
            {
                persistanceManager.storeLocal   = false;
                persistanceManager.storeInForms = false;
            }
            trackerMannager.setTrackers();
        }



        //Debug.Log("-----------Waiting---------");
    }
Beispiel #3
0
    public void setNew()
    {
        handOnObject = false;
        goal         = 0;
        showing      = false;
        stage        = -1;



        if (logicGame != null)
        {
            idPlayer              = Int32.Parse(gameObject.name.ToCharArray()[gameObject.name.Length - 1] + "");
            homePosition          = logicGame.homePositions[idPlayer];
            homePosition2         = logicGame.homePositions2[idPlayer];
            positions             = logicGame.positions;
            objects               = logicGame.objects;
            onTurn                = (idPlayer == logicGame.currentPlayer);
            notificationsMannager = GameObject.Find("Instructions Player " + idPlayer).GetComponent <NotificationsMannager>();
            notificationsMannager.lightStepNotification(7);
        }
        trackerMannager.setTrackers();
        //fillPlayerInformation();
        fillPlayerInformationFull();
    }