void Start()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }

        instance = this;
        GameObject.DontDestroyOnLoad(gameObject);
    }
Exemple #2
0
    public void SaveData()
    {
        StrabismusData tmp = GameObject.Find("StrabismusData").GetComponent <StrabismusData>();

        tmp.lefSquint           = this.lefSquint;
        tmp.rightSquint         = this.rightSquint;
        tmp.endo                = this.endo;
        tmp.exo                 = this.exo;
        tmp.isForia             = false; //////*******FOR NOW ... maybe (otherwise it'll be removed)
        tmp.isTropia            = true;  //////*******FOR NOW ... maybe (otherwise it'll be removed)
        tmp.angleOfDisalignment = this.angleOfDisalignment;

        SceneLoader sl = GameObject.Find("SceneLoader").GetComponent <SceneLoader>();

        sl.LoadScene("MainMenu");
    }
Exemple #3
0
 void Awake()
 {
     data = GameObject.Find("StrabismusData").GetComponent <StrabismusData>();
     SetStrabismus();
 }