private void Start()
    {
        manouver_time = 2;
        feedbackmodel = new List <FeedbackModel>();
        passwordmodel = new PasswordModel(new List <String>()
        {
            "POS1", "POS2", "POS3", "POS4"
        }, 4);
        triggers      = GameObject.Find("Triggers");
        triggerScript = triggers.GetComponent <SelectionController>();
        newtrial      = false;
        feedback_time = 1;
        // Get EyeTracker unity object
        _eyeTracker = Tobii.Research.Unity.VREyeTracker.Instance;
        if (_eyeTracker == null)
        {
            Debug.Log("Failed to find eye tracker, has it been added to scene?");
        }

        _gazeTrail = Tobii.Research.Unity.VRGazeTrail.Instance;

        _highlightInfo = new ActiveObject();

        started = false;
    }
Beispiel #2
0
 private void Start()
 {
     _lastParticleCount = _particleCount;
     _particles         = new ParticleSystem.Particle[_particleCount];
     _eyeTracker        = VREyeTracker.Instance;
     _particleSystem    = GetComponent <ParticleSystem>();
     _calibrationObject = VRCalibration.Instance;
 }
Beispiel #3
0
    // called by anyone
    public void Init()
    {
        if (GlobalHandler.modality == 0 || GlobalHandler.modality == 2)
        {
            if (GameObject.Find("HeadPosePoint") != null)
            {
                GameObject.Find("HeadPosePoint").SetActive(false);
            }
        }
        if (GlobalHandler.modality == 1 || GlobalHandler.modality == 2)
        {
            if (GameObject.Find("[VRGazeTrail]") != null)
            {
                GameObject.Find("[VRGazeTrail]").SetActive(false);
            }
        }
        foreach (GameObject pin in GameObject.FindGameObjectsWithTag("PIN"))
        {
            materialholderList.Add(new MaterialHolder(pin.GetComponent <MeshRenderer>().material, pin.gameObject));
        }
        currentGameobject = null;
        // Get EyeTracker unity object
        _eyeTracker = Tobii.Research.Unity.VREyeTracker.Instance;
        if (_eyeTracker == null)
        {
            Debug.Log("Failed to find eye tracker, has it been added to scene?");
        }

        _gazeTrail = Tobii.Research.Unity.VRGazeTrail.Instance;

        _highlightInfo = new ActiveObject();

        selectedPINS = new List <String>();

        inputtime     = 0;
        fullinputtime = 0;
        started       = false;
        stopped       = false;
        // not relevant but we need it because of the current implementation
        passwordmodel = new PasswordModel(new List <String>()
        {
            "POSX1G", "POSX1G", "POSX1G", "POSX1G"
        }, 4);
        //
        fw       = GameObject.Find("Storage").GetComponent <CreativityWriter>();
        mdfw     = GameObject.Find("Storage").GetComponent <MetaDataWriter>();
        fullfw   = GameObject.Find("Storage").GetComponent <FullCreativityWriter>();
        fullmdfw = GameObject.Find("Storage").GetComponent <FullMetaDataWriter>();
        fullfw.StartRecording();
        fullmdfw.StartRecording();
        //Debug.Log(GameObject.Find("Planes").transform.rotation);
        feedbackElements = new List <FeedbackModel>();
        feedbacktime     = 0.4f;
    }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {
        Tobii.Research.Unity.VREyeTracker _tobiiEyeTracker = Tobii.Research.Unity.VREyeTracker.Instance;
        if (_tobiiEyeTracker != null && _tobiiEyeTracker.Connected)
        {
            IVRGazeData last_ivrGazeData = _tobiiEyeTracker.LatestGazeData;



            // set SaveInfo dic
            SaveInfo = new Dictionary <string, Dictionary <string, string> > {
            };


            // Timestamp
            if (last_ivrGazeData.OriginalGaze != null)            //)
            {
                SaveInfo.AddToNestedDictionary("Time", "DeviceTimeStamp", last_ivrGazeData.OriginalGaze.DeviceTimeStamp.ToString());
                SaveInfo.AddToNestedDictionary("Time", "SystemTimeStamp", last_ivrGazeData.OriginalGaze.SystemTimeStamp.ToString());
//				print ( last_ivrGazeData.OriginalGaze.DeviceTimeStamp.ToString ());
            }


            // Head
            SaveInfo.AddToNestedDictionary("Head", "Position_X", last_ivrGazeData.Pose.Position.x.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("Head", "Position_Y", last_ivrGazeData.Pose.Position.y.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("Head", "Position_Z", last_ivrGazeData.Pose.Position.z.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("Head", "Rotation_X", last_ivrGazeData.Pose.Rotation.eulerAngles.x.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("Head", "Rotation_Y", last_ivrGazeData.Pose.Rotation.eulerAngles.y.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("Head", "Rotation_Z", last_ivrGazeData.Pose.Rotation.eulerAngles.z.ToString(FORMAT_FLOAT));



            //		combined gaze
            SaveInfo.AddToNestedDictionary("CombinedGaze", "RayOrigin_X", last_ivrGazeData.CombinedGazeRayWorld.origin.x.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("CombinedGaze", "RayOrigin_Y", last_ivrGazeData.CombinedGazeRayWorld.origin.y.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("CombinedGaze", "RayOrigin_Z", last_ivrGazeData.CombinedGazeRayWorld.origin.z.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("CombinedGaze", "RayDirection_X", last_ivrGazeData.CombinedGazeRayWorld.direction.x.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("CombinedGaze", "RayDirection_Y", last_ivrGazeData.CombinedGazeRayWorld.direction.y.ToString(FORMAT_FLOAT));
            SaveInfo.AddToNestedDictionary("CombinedGaze", "RayDirection_Z", last_ivrGazeData.CombinedGazeRayWorld.direction.z.ToString(FORMAT_FLOAT));


            // Eye
            //      left
            WriteTobiiEyeData("LeftEye", last_ivrGazeData.Left);
            //		right
            WriteTobiiEyeData("RightEye", last_ivrGazeData.Right);



            SaveData.Instance.AddToList(SaveInfo);
        }
    }
        private void Start()
        {
            _sizeOfparent   = HMDPlacementCanvas.PupilLeft.parent.GetComponent <RectTransform>().sizeDelta;
            _sizeOfparent.y = -1 * _sizeOfparent.y;
            _eyeTracker     = VREyeTracker.Instance;
            _calibration    = VRCalibration.Instance;

            transform.parent        = VRUtility.EyeTrackerOriginVive;
            transform.localRotation = Quaternion.identity;
            transform.localPosition = Vector3.zero;
            _leftImage             = HMDPlacementCanvas.PupilLeft.GetComponent <Image>();
            _rightImage            = HMDPlacementCanvas.PupilRight.GetComponent <Image>();
            _center                = new Vector2(0.5f, 0.5f);
            PositioningGuideActive = _positioningGuideActive;
        }
Beispiel #6
0
    // called by anyone
    public void Init()
    {
        if (GlobalHandler.modality == 0 || GlobalHandler.modality == 2)
        {
            if (GameObject.Find("HeadPosePoint") != null)
            {
                GameObject.Find("HeadPosePoint").SetActive(false);
            }
        }
        if (GlobalHandler.modality == 1 || GlobalHandler.modality == 2)
        {
            if (GameObject.Find("[VRGazeTrail]") != null)
            {
                GameObject.Find("[VRGazeTrail]").SetActive(false);
            }
        }
        foreach (GameObject pin in GameObject.FindGameObjectsWithTag("PIN"))
        {
            materialholderList.Add(new MaterialHolder(pin.GetComponent <MeshRenderer>().material, pin.gameObject));
        }
        if (GlobalHandler.attackerscenario == 99) // which meas the expert observation attack is running
        {
            foreach (MaterialHolder materialobj in materialholderList)
            {
                materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
            }
            passwordmodel = new PasswordModel(new List <String>()
            {
                "POSX1W", "POSX3W", "POSX5G", "POSX6O"
            }, 4);
        }
        // change this area for each participant to ensure no follow-up effects

        /*
         *
         *                          START
         */
        // for each participant, create file

        if (GlobalHandler.attackerscenario == 1)
        {
            if (GlobalHandler.modality == 0)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX4G", "POSX2R", "POSX5R", "POSX8R"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX4G", "POSX2R", "POSX5R", "POSX8R"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX8W", "POSX6R", "POSX4R", "POSX2G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX8W", "POSX6R", "POSX4R", "POSX2G"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1W", "POSX1R", "POSX1B", "POSX1O"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1W", "POSX1R", "POSX1B", "POSX1O"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1G", "POSX3G", "POSX7G", "POSX9G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1G", "POSX3G", "POSX7G", "POSX9G"
                    });
                    break;
                }
            }
            if (GlobalHandler.modality == 1)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1G", "POSX4G", "POSX7G", "POSX8G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1G", "POSX4G", "POSX7G", "POSX8G"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1G", "POSX1W", "POSX2O", "POSX2B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1G", "POSX1W", "POSX2O", "POSX2B"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX6G", "POSX2O", "POSX3O", "POSX4G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX6G", "POSX2O", "POSX3O", "POSX4G"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX5G", "POSX4G", "POSX1W", "POSX2W"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX5G", "POSX4G", "POSX1W", "POSX2W"
                    });
                    break;
                }
            }
            if (GlobalHandler.modality == 2)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX5W", "POSX4O", "POSX6W", "POSX9W"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX5W", "POSX4O", "POSX6W", "POSX9W"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX4O", "POSX6W", "POSX5G", "POSX8R"
                    }, 4);

                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX4O", "POSX6W", "POSX5G", "POSX8R"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX3G", "POSX6G", "POSX9G", "POSX3W"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX3G", "POSX6G", "POSX9G", "POSX3W"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX9G", "POSX7G", "POSX5G", "POSX3G"
                    }, 4);

                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX9G", "POSX7G", "POSX5G", "POSX3G"
                    });
                    break;
                }
            }
        }

        if (GlobalHandler.attackerscenario == 2)
        {
            if (GlobalHandler.modality == 0)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX4W", "POSX5W", "POSX6W", "POSX7W"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX4W", "POSX5W", "POSX6W", "POSX7W"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX4W", "POSX5W", "POSX6W", "POSX6R"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX4W", "POSX5W", "POSX6W", "POSX6R"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1G", "POSX2G", "POSX3O", "POSX4B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1G", "POSX2G", "POSX3O", "POSX4B"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX5G", "POSX6W", "POSX7R", "POSX8G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX5G", "POSX6W", "POSX7R", "POSX8G"
                    });
                    break;
                }
            }
            if (GlobalHandler.modality == 1)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX3G", "POSX6G", "POSX2G", "POSX1G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX3G", "POSX6G", "POSX2G", "POSX1G"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX3G", "POSX3O", "POSX2O", "POSX1O"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX3G", "POSX3O", "POSX2O", "POSX1O"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX4G", "POSX6G", "POSX5O", "POSX5B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX4G", "POSX6G", "POSX5O", "POSX5B"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1O", "POSX5W", "POSX3R", "POSX7B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1O", "POSX5W", "POSX3R", "POSX7B"
                    });
                    break;
                }
            }
            if (GlobalHandler.modality == 2)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX2G", "POSX4R", "POSX6O", "POSX8B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX2G", "POSX4R", "POSX6O", "POSX8B"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX7W", "POSX9R", "POSX9B", "POSX8B"
                    }, 4);

                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX7W", "POSX9R", "POSX9B", "POSX8B"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX5G", "POSX7G", "POSX6G", "POSX8G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX5G", "POSX7G", "POSX6G", "POSX8G"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX2G", "POSX2W", "POSX5W", "POSX8W"
                    }, 4);

                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX2G", "POSX2W", "POSX5W", "POSX8W"
                    });
                    break;
                }
            }
        }

        if (GlobalHandler.attackerscenario == 3)
        {
            if (GlobalHandler.modality == 0)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX9G", "POSX5G", "POSX1G", "POSX2G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX9G", "POSX5G", "POSX1G", "POSX2G"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX3G", "POSX4W", "POSX3O", "POSX4B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX3G", "POSX4W", "POSX3O", "POSX4B"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1G", "POSX1O", "POSX2O", "POSX3O"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1G", "POSX1O", "POSX2O", "POSX3O"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX1W", "POSX3W", "POSX5G", "POSX6O"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX1W", "POSX3W", "POSX5G", "POSX6O"
                    });
                    break;
                }
            }
            if (GlobalHandler.modality == 1)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX5R", "POSX3W", "POSX7G", "POSX9B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX5R", "POSX3W", "POSX7G", "POSX9B"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX5G", "POSX6G", "POSX8G", "POSX9G"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX5G", "POSX6G", "POSX8G", "POSX9G"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX2W", "POSX8G", "POSX7G", "POSX3R"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX2W", "POSX8G", "POSX7G", "POSX3R"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX5W", "POSX5B", "POSX6B", "POSX7B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX5W", "POSX5B", "POSX6B", "POSX7B"
                    });
                    break;
                }
            }
            if (GlobalHandler.modality == 2)
            {
                switch (trials)
                {
                case 0:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX9W", "POSX3B", "POSX5B", "POSX7B"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX9W", "POSX3B", "POSX5B", "POSX7B"
                    });
                    break;

                case 1:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX2W", "POSX4W", "POSX6W", "POSX8W"
                    }, 4);

                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX2W", "POSX4W", "POSX6W", "POSX8W"
                    });
                    break;

                case 2:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX2G", "POSX2W", "POSX2R", "POSX3R"
                    }, 4);
                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX2G", "POSX2W", "POSX2R", "POSX3R"
                    });
                    break;

                case 3:
                    foreach (MaterialHolder materialobj in materialholderList)
                    {
                        materialobj.Gameobject.GetComponent <MeshRenderer>().material = materialobj.Material;
                    }
                    passwordmodel = new PasswordModel(new List <String>()
                    {
                        "POSX6G", "POSX1W", "POSX9R", "POSX5B"
                    }, 4);

                    pwGenerator.generateCube(new List <string>()
                    {
                        "POSX6G", "POSX1W", "POSX9R", "POSX5B"
                    });
                    break;
                }
            }
        }

        /*
         *
         *                          END
         */

        currentGameobject = null;
        // Get EyeTracker unity object
        _eyeTracker = Tobii.Research.Unity.VREyeTracker.Instance;
        if (_eyeTracker == null)
        {
            Debug.Log("Failed to find eye tracker, has it been added to scene?");
        }

        _gazeTrail = Tobii.Research.Unity.VRGazeTrail.Instance;

        _highlightInfo = new ActiveObject();

        selectedPINS = new List <String>();

        inputtime     = 0;
        fullinputtime = 0;
        started       = false;
        stopped       = false;
        // not relevant but we need it because of the current implementation
        //passwordmodel = new PasswordModel(new List<String>() { "POSX1G", "POSX1G", "POSX1G", "POSX1G" }, 4);
        //
        //fw = GameObject.Find("Storage").GetComponent<SecurityWriter>();
        mdfw     = GameObject.Find("Storage").GetComponent <MetaDataWriter>();
        fullfw   = GameObject.Find("Storage").GetComponent <FullSecurityWriter>();
        fullmdfw = GameObject.Find("Storage").GetComponent <FullMetaDataWriter>();
        //fullfw.StartRecording();
        fullmdfw.StartRecording();
        //Debug.Log(GameObject.Find("Planes").transform.rotation);
        feedbackElements = new List <FeedbackModel>();
        feedbacktime     = 0.4f;
    }
    // called by anyone
    public void Init()
    {
        Debug.Log("trigger countercalls" + counterCalls);
        if (GlobalHandler.training)
        {
            passwordmodel = new PasswordModel(new List <String>()
            {
                "POSX1Y", "POSX2Y", "POSX3Y", "POSX4Y"
            }, 4);
        }
        else
        {
            switch (GlobalHandler.password)
            {
            case 1:
                passwordmodel = new PasswordModel(new List <String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword0S1");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                });
                break;

            case 2:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX3G", "POSX4G", "POSX5G", "POSX6G"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword0S2");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX3G", "POSX4G", "POSX5G", "POSX6G"
                });

                break;

            case 3:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX3G", "POSX7G", "POSX9G"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword0S3");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX1G", "POSX3G", "POSX7G", "POSX9G"
                });

                break;

            case 4:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX5G", "POSX6G", "POSX7G", "POSX8G"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword1S1");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX5G", "POSX6G", "POSX7G", "POSX8G"
                });

                break;

            case 5:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX6G", "POSX7G", "POSX8G", "POSX9G"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword1S2");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX6G", "POSX7G", "POSX8G", "POSX9G"
                });

                break;

            case 6:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX8G", "POSX9G"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword1S3");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX1G", "POSX2G", "POSX8G", "POSX9G"
                });

                break;

            case 7:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX9G", "POSX6G", "POSX5R", "POSX6R"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword2S1");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX9G", "POSX6G", "POSX5R", "POSX6R"
                });

                break;

            case 8:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX9G", "POSX1W", "POSX2W"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword2S2");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX1G", "POSX9G", "POSX1W", "POSX2W"
                });

                break;

            case 9:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX4G", "POSX5G", "POSX6G", "POSX5B"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword2S3");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX4G", "POSX5G", "POSX6G", "POSX5B"
                });

                break;

            case 10:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX7G", "POSX8G", "POSX1R", "POSX2R"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword3S1");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX7G", "POSX8G", "POSX1R", "POSX2R"
                });

                break;

            case 11:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX5G", "POSX1W", "POSX2W", "POSX3W"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword3S2");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX5G", "POSX1W", "POSX2W", "POSX3W"
                });

                break;

            case 12:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX9G", "POSX8G", "POSX1B", "POSX2B"
                }, 4);
                //password.GetComponent<RawImage>().texture = (Texture2D)Resources.Load("Passwords/2DPassword3S3");
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX9G", "POSX8G", "POSX1B", "POSX2B"
                });

                break;

            case 13:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX4G", "POSX1W", "POSX2W", "POSX1O"
                }, 4);
                //password.GetComponent<RawImage>().texture = null;
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX4G", "POSX1W", "POSX2W", "POSX1O"
                });
                break;

            case 14:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX5R", "POSX1W"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX1G", "POSX2G", "POSX5R", "POSX1W"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;

            case 15:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX5G", "POSX5R", "POSX5B", "POSX6B"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX5G", "POSX5R", "POSX5B", "POSX6B"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;

            case 16:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX4G", "POSX4W", "POSX6W", "POSX5O"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX4G", "POSX4W", "POSX6W", "POSX5O"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;

            case 17:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX5G", "POSX5R", "POSX1W", "POSX2W"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX5G", "POSX5R", "POSX1W", "POSX2W"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;

            case 18:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX7G", "POSX7W", "POSX9W", "POSX7O"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX7G", "POSX7W", "POSX9W", "POSX7O"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;

            case 19:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX7G", "POSX5W", "POSX9B", "POSX7R"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX7G", "POSX5W", "POSX9B", "POSX7R"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;

            case 20:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX3G", "POSX3W", "POSX4O", "POSX5R"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX3G", "POSX3W", "POSX4O", "POSX5R"
                });
                // password.GetComponent<RawImage>().texture = null;

                break;

            case 21:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX3O", "POSX4B", "POSX5W"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX2G", "POSX3O", "POSX4B", "POSX5W"
                });
                // password.GetComponent<RawImage>().texture = null;

                break;

            case 22:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX5G", "POSX2W", "POSX5B", "POSX9R"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX5G", "POSX2W", "POSX5B", "POSX9R"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;

            case 23:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX1W", "POSX5B", "POSX6O"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX1G", "POSX1W", "POSX5B", "POSX6O"
                });
                // password.GetComponent<RawImage>().texture = null;

                break;

            case 24:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX1W", "POSX1R", "POSX5B"
                }, 4);
                pwGenerator.generateCube(new List <string>()
                {
                    "POSX1G", "POSX1W", "POSX1R", "POSX5B"
                });
                //password.GetComponent<RawImage>().texture = null;

                break;
            }
        }

        /*if (trials <= 1)
         * {
         *  password.GetComponent<RawImage>().texture = null;
         *  foreach (MaterialHolder materialobj in materialholderList)
         *  {
         *      materialobj.Gameobject.GetComponent<MeshRenderer>().material = materialobj.Material;
         *  }
         *
         * }*/

        currentGameobject = null;
        // Get EyeTracker unity object
        _eyeTracker = Tobii.Research.Unity.VREyeTracker.Instance;
        if (_eyeTracker == null)
        {
            Debug.Log("Failed to find eye tracker, has it been added to scene?");
        }

        _gazeTrail = Tobii.Research.Unity.VRGazeTrail.Instance;

        _highlightInfo = new ActiveObject();

        selectedPINS = new List <String>();

        inputtime          = 0;
        fullinputtime      = 0;
        started            = false;
        stopped            = false;
        timerfinalgazedata = 0.3f;
        fw       = GameObject.Find("Storage").GetComponent <FileWriter2>();
        mdfw     = GameObject.Find("Storage").GetComponent <MetaDataWriter>();
        fullfw   = GameObject.Find("Storage").GetComponent <FullFileWriter2>();
        fullmdfw = GameObject.Find("Storage").GetComponent <FullMetaDataWriter>();
        fullfw.StartRecording();
        fullmdfw.StartRecording();
        Debug.Log(GameObject.Find("Planes").transform.rotation);
    }
 protected override void OnStart()
 {
     base.OnStart();
     _eyeTracker        = VREyeTracker.Instance;
     _calibrationObject = VRCalibration.Instance;
 }
 private void Start()
 {
     _eyeTracker = VREyeTracker.Instance;
 }
Beispiel #10
0
 private void Awake()
 {
     _instance = this;
 }
    public void Init()
    {
        switch (GlobalHandler.password)
        {
        case 1:
            passwordmodel = new PasswordModel(new List <String>()
            {
                "POSX1G", "POSX2G", "POSX3G", "POSX4G"
            }, 4);
            break;

        case 2:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX3G", "POSX4G", "POSX5G", "POSX6G"
            }, 4);
            break;

        case 3:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX1G", "POSX3G", "POSX7G", "POSX9G"
            }, 4);
            break;

        case 4:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX9G", "POSX6G", "POSX5R", "POSX6R"
            }, 4);
            break;

        case 5:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX1G", "POSX9G", "POSX1W", "POSX2W"
            }, 4);
            break;

        case 6:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX4G", "POSX5G", "POSX6G", "POSX5B"
            }, 4);
            break;

        case 7:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX4G", "POSX1W", "POSX2W", "POSX1O"
            }, 4);
            break;

        case 8:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX1G", "POSX2G", "POSX5R", "POSX1W"
            }, 4);
            break;

        case 9:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX5G", "POSX5R", "POSX5B", "POSX6B"
            }, 4);
            break;

        case 10:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX7G", "POSX5W", "POSX9B", "POSX7R"
            }, 4);
            break;

        case 11:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX3G", "POSX3W", "POSX4O", "POSX5R"
            }, 4);
            break;

        case 12:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX2G", "POSX3O", "POSX4B", "POSX5W"
            }, 4);
            break;

        case 13:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX5G", "POSX6G", "POSX7G", "POSX8G"
            }, 4);
            break;

        case 14:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX6G", "POSX7G", "POSX8G", "POSX9G"
            }, 4);
            break;

        case 15:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX1G", "POSX2G", "POSX8G", "POSX9G"
            }, 4);
            break;

        case 16:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX7G", "POSX8G", "POSX1R", "POSX2R"
            }, 4);
            break;

        case 17:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX5G", "POSX1W", "POSX2W", "POSX3W"
            }, 4);
            break;

        case 18:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX9G", "POSX8G", "POSX1B", "POSX2B"
            }, 4);
            break;

        case 19:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX4G", "POSX4W", "POSX6W", "POSX5O"
            }, 4);
            break;

        case 20:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX5G", "POSX5R", "POSX1W", "POSX2W"
            }, 4);
            break;

        case 21:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX7G", "POSX7W", "POSX9W", "POSX7O"
            }, 4);
            break;

        case 22:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX5G", "POSX2W", "POSX5B", "POSX9R"
            }, 4);
            break;

        case 23:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX1G", "POSX1W", "POSX5B", "POSX6O"
            }, 4);
            break;

        case 24:
            passwordmodel = new PasswordModel(new List <System.String>()
            {
                "POSX1G", "POSX1W", "POSX1R", "POSX5B"
            }, 4);
            break;
        }
        foreach (GameObject pin in GameObject.FindGameObjectsWithTag("PIN"))
        {
            materialholderList.Add(new MaterialHolder(pin.GetComponent <MeshRenderer>().material, pin.gameObject));
        }
        currentGameobject = null;
        // Get EyeTracker unity object
        _eyeTracker = Tobii.Research.Unity.VREyeTracker.Instance;
        if (_eyeTracker == null)
        {
            Debug.Log("Failed to find eye tracker, has it been added to scene?");
        }

        _gazeTrail = Tobii.Research.Unity.VRGazeTrail.Instance;

        _highlightInfo = new ActiveObject();

        selectedPINS  = new List <String>();
        inputtime     = 0;
        fullinputtime = 0;

        timerfinalgazedata = 0.3f;
        started            = false;
        stopped            = false;
        fw       = GameObject.Find("Storage").GetComponent <FileWriter1>();
        mdfw     = GameObject.Find("Storage").GetComponent <MetaDataWriter>();
        fullfw   = GameObject.Find("Storage").GetComponent <FullFileWriter1>();
        fullmdfw = GameObject.Find("Storage").GetComponent <FullMetaDataWriter>();
        fullfw.StartRecording();
        fullmdfw.StartRecording();
    }
    // called by anyone
    public void Init()
    {
        if (GlobalHandler.modality == 0 || GlobalHandler.modality == 2)
        {
            if (GameObject.Find("HeadPosePoint") != null)
            {
                GameObject.Find("HeadPosePoint").SetActive(false);
            }
        }
        if (GlobalHandler.modality == 1 || GlobalHandler.modality == 2)
        {
            if (GameObject.Find("[VRGazeTrail]") != null)
            {
                GameObject.Find("[VRGazeTrail]").SetActive(false);
            }
        }
        foreach (GameObject pin in GameObject.FindGameObjectsWithTag("PIN"))
        {
            materialholderList.Add(new MaterialHolder(pin.GetComponent <MeshRenderer>().material, pin.gameObject));
        }
        currentGameobject = null;
        // Get EyeTracker unity object
        _eyeTracker = Tobii.Research.Unity.VREyeTracker.Instance;
        if (_eyeTracker == null)
        {
            Debug.Log("Failed to find eye tracker, has it been added to scene?");
        }

        _gazeTrail = Tobii.Research.Unity.VRGazeTrail.Instance;

        _highlightInfo = new ActiveObject();

        selectedPINS = new List <String>();

        inputtime     = 0;
        fullinputtime = 0;
        started       = false;
        stopped       = false;
        // not relevant but we need it because of the current implementation
        // participant passwords
        if (security == "weak")
        {
            switch (GlobalHandler.participant_number)
            {
            case 1:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1W", "POSX2W", "POSX3W", "POSX4W"
                }, 4);
                break;

            case 2:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 3:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 4:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX1G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 5:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 6:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 7:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX4G", "POSX7G", "POSX8G"
                }, 4);
                break;

            case 8:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX4G", "POSX7G", "POSX8G"
                }, 4);
                break;

            case 9:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX3G", "POSX1G", "POSX4G", "POSX1G"
                }, 4);
                break;

            case 10:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1W", "POSX2W", "POSX3W", "POSX4W"
                }, 4);
                break;

            case 11:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 12:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 13:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1W", "POSX2W", "POSX3W", "POSX4W"
                }, 4);
                break;

            case 14:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX4G", "POSX6G", "POSX8G"
                }, 4);
                break;

            case 15:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 16:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX4G", "POSX6G", "POSX8G"
                }, 4);
                break;

            case 17:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX5G", "POSX5G", "POSX5G", "POSX5G"
                }, 4);
                break;

            case 18:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 19:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 20:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX8W", "POSX2O", "POSX4R"
                }, 4);
                break;

            case 21:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1W", "POSX5W", "POSX9W", "POSX6W"
                }, 4);
                break;

            case 22:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 23:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;
            }
        }
        else if (security == "medium")
        {
            switch (GlobalHandler.participant_number)
            {
            case 1:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2W", "POSX4W", "POSX6W", "POSX8W"
                }, 4);
                break;

            case 2:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX4G", "POSX1W", "POSX1W"
                }, 4);
                break;

            case 3:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3O", "POSX4O"
                }, 4);
                break;

            case 4:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX5G", "POSX9G", "POSX1O"
                }, 4);
                break;

            case 5:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2W", "POSX3O", "POSX4R"
                }, 4);
                break;

            case 6:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3W", "POSX4W"
                }, 4);
                break;

            case 7:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX3G", "POSX1W", "POSX9W"
                }, 4);
                break;

            case 8:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX8G", "POSX2O", "POSX4O"
                }, 4);
                break;

            case 9:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX2G", "POSX4B", "POSX4O"
                }, 4);
                break;

            case 10:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2W", "POSX3W", "POSX4O"
                }, 4);
                break;

            case 11:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1R", "POSX2W", "POSX3G", "POSX4R"
                }, 4);
                break;

            case 12:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX5G", "POSX8G", "POSX3G"
                }, 4);
                break;

            case 13:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2G", "POSX3G", "POSX4G"
                }, 4);
                break;

            case 14:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX6G", "POSX1G", "POSX7G", "POSX9G"
                }, 4);
                break;

            case 15:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX6G", "POSX5G", "POSX7G", "POSX1G"
                }, 4);
                break;

            case 16:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX6G", "POSX7G", "POSX3G"
                }, 4);
                break;

            case 17:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX4G", "POSX8G", "POSX6G"
                }, 4);
                break;

            case 18:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX9G", "POSX6G", "POSX3G"
                }, 4);
                break;

            case 19:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX3G", "POSX5G", "POSX7G"
                }, 4);
                break;

            case 20:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX3G", "POSX2W", "POSX3O", "POSX9R"
                }, 4);
                break;

            case 21:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1W", "POSX4W", "POSX7W", "POSX5W"
                }, 4);
                break;

            case 22:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX9G", "POSX1G", "POSX9G"
                }, 4);
                break;

            case 23:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX5G", "POSX9G", "POSX6G"
                }, 4);
                break;
            }
        }
        else if (security == "strong")
        {
            switch (GlobalHandler.participant_number)
            {
            case 1:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2W", "POSX2W", "POSX8W", "POSX4W"
                }, 4);
                break;

            case 2:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX4G", "POSX4O", "POSX2W", "POSX2W"
                }, 4);
                break;

            case 3:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX5W", "POSX8B", "POSX9B"
                }, 4);
                break;

            case 4:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX9R", "POSX6Y", "POSX1B", "POSX3G"
                }, 4);
                break;

            case 5:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX7G", "POSX5O", "POSX2W", "POSX3G"
                }, 4);
                break;

            case 6:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX2W", "POSX3O", "POSX4B"
                }, 4);
                break;

            case 7:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX5W", "POSX5O", "POSX3B"
                }, 4);
                break;

            case 8:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX8G", "POSX2W", "POSX4O"
                }, 4);
                break;

            case 9:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX6G", "POSX8G", "POSX6B", "POSX1W"
                }, 4);
                break;

            case 10:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX3W", "POSX9W", "POSX9G", "POSX1G"
                }, 4);
                break;

            case 11:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX7G", "POSX6B", "POSX8W", "POSX5Y"
                }, 4);
                break;

            case 12:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX9G", "POSX8G", "POSX1G", "POSX5G"
                }, 4);
                break;

            case 13:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX4B", "POSX3G", "POSX9R", "POSX4G"
                }, 4);
                break;

            case 14:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX4G", "POSX1O", "POSX3W", "POSX2R"
                }, 4);
                break;

            case 15:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX8O", "POSX2O", "POSX3W", "POSX8W"
                }, 4);
                break;

            case 16:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX4G", "POSX1G", "POSX9G"
                }, 4);
                break;

            case 17:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX1O", "POSX9W", "POSX9W"
                }, 4);
                break;

            case 18:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX9G", "POSX6W", "POSX6O"
                }, 4);
                break;

            case 19:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX1G", "POSX5O", "POSX9B", "POSX5R"
                }, 4);
                break;

            case 20:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX6W", "POSX4W", "POSX9O", "POSX7O"
                }, 4);
                break;

            case 21:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2W", "POSX4W", "POSX6W", "POSX8W"
                }, 4);
                break;

            case 22:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX6G", "POSX2O", "POSX7W", "POSX5R"
                }, 4);
                break;

            case 23:
                passwordmodel = new PasswordModel(new List <System.String>()
                {
                    "POSX2G", "POSX3R", "POSX2W", "POSX3O"
                }, 4);
                break;
            }
        }
        //
        //fw = GameObject.Find("Storage").GetComponent<CreativityWriter>();
        mdfw = GameObject.Find("Storage").GetComponent <MetaDataWriter>();
        //fullfw = GameObject.Find("Storage").GetComponent<FullCreativityWriter>();
        fullmdfw = GameObject.Find("Storage").GetComponent <FullMetaDataWriter>();
        //fullfw.StartRecording();
        fullmdfw.StartRecording();
        //Debug.Log(GameObject.Find("Planes").transform.rotation);
        feedbackElements = new List <FeedbackModel>();
        feedbacktime     = 0.4f;
    }