Ejemplo n.º 1
0
    void Start()
    {
        CMCScript = GameObject.Find("Cubeman").GetComponent <CubemanController>();
        video     = GameObject.Find("Video").GetComponent <PlayVideo>();
        writer    = new StreamWriter("Assets/MED7Folder/Txtfiles/MPCTest.txt", true);
        writer.WriteLine("New score data:");

        theMixer.SetFloat("Torso_Attenuation", 0);
    }
Ejemplo n.º 2
0
    private Color greenEnd;                             // End color for green gradient

    // Use this for initialization
    void Start()
    {
        cubeman            = FindObjectOfType <CubemanController>();                            // Finds and initializes CubemanController
        CMCPostureScriptHP = GameObject.Find("FilterController").GetComponent <CMCPostureHP>(); // Finds and initializes posture script
        greenStart         = new Color(0f, 0.26f, 0.01f, 1f);                                   // Sets colors for red
        greenEnd           = new Color(0f, 1f, 0.235f, 1f);                                     // Sets colors for red
        redStart           = new Color(0.66f, 0f, 0.01f, 1f);                                   // Sets colors for green
        redEnd             = new Color(1f, 0f, 0.0f, 1f);                                       // Sets colors for green
    }
Ejemplo n.º 3
0
    void Start()
    {
        caliTimer = GameObject.Find("UIManager").GetComponent <CalibrationTimer>();
        cubeman   = GameObject.Find("Cubeman").GetComponent <CubemanController>();

        Vec_ArrListShoulder = new ArrayList();
        Vec_ArrListNeck     = new ArrayList();
        Vec_ArrListHip      = new ArrayList();

        Qua_ArrListHip = new ArrayList();

        hasCalibrated = false;
    }
Ejemplo n.º 4
0
    public static PoseData getPoseData()
    {
        PoseData          pd = new PoseData();
        CubemanController cm = GameObject.Find("Cubeman").GetComponent <CubemanController>();

        GameObject[] bones = cm.GetBones();
        for (int i = 0; i < 20; i++)
        {
            pd.bonePos[i] = bones[i].transform.position;
            pd.bonePos[i] = bones[i].transform.localEulerAngles;
        }
        return(pd);
    }
Ejemplo n.º 5
0
 //IDList: {"angulo":4,"distZ":5,"distX":6,"ponto":7}
 // Use this for initialization
 void Start()
 {
     save    = new Save();
     interfc = GameObject.Find("Preferencias").GetComponent <Interface>();
     jogador = new Player()
     {
         id = interfc.pacienteID, interacao = interfc.sessaoPaciente
     };
     parametros     = new List <Dado> ();
     url            = interfc.url;
     player         = GameObject.Find("Player");
     cManController = GameObject.Find("Cuberman").GetComponent <CubemanController> ();
     //InvokeRepeating ("updateData", 0.1f, 0.1f);
     StartCoroutine("starGetData");
 }
Ejemplo n.º 6
0
    //====================================================================

    public void StartPlaying(string danceName)
    {
        ClearCharacters();

        _currentDance = danceName;

        _replayCharacter = Instantiate(_replayCharacterPrefab).GetComponent <MyCharacterController>();
        _replayCharacter.transform.position = _replayCharPos;

        _cubemanCharacter = Instantiate(_cubemanPrefab).GetComponent <CubemanController>();
        _cubemanCharacter.transform.position = _avatarCharPos;

        UIManager.Instance.SwitchState(UIManager.Instance.PlayUiState);

        Invoke("Play", 0.5f);
    }
Ejemplo n.º 7
0
    void Start()
    {
        if (GameObject.Find("Cubeman") != null)
        {
            CMCScript = GameObject.Find("Cubeman").GetComponent <CubemanController>();
        }
        else
        {
            Debug.Log("MED7 Warning: GameObject.Find(Cubeman) is null");
        }

        if (GameObject.Find("CalibrationData") != null)
        {
            CalibraScript = GameObject.Find("CalibrationData").GetComponent <Calibration>();

            finishedCali          = CalibraScript.finishedCali;
            calibraShoulderCenVec = CalibraScript.Vec_calibraShoulderCen;
            calibraHipVec         = CalibraScript.Vec_calibraHip;
            calibraNeckVec        = CalibraScript.Vec_calibraNeck;
            calibraHipRot         = CalibraScript.Qua_calibraHip;
        }
        else
        {
            Debug.Log("MED7 Warning: GameObject.Find(CalibrationData) is null");
            Debug.Log("MED7 Warning: meaining calibration values hasnt been obtained and are set to 0");
            finishedCali          = true;
            calibraShoulderCenVec = Vector3.zero;
            calibraHipVec         = Vector3.zero;
            calibraNeckVec        = Vector3.zero;
            calibraHipRot         = Quaternion.identity;
        }

        video  = GameObject.Find("Video").GetComponent <PlayVideo>();
        writer = new StreamWriter("Assets/MED7Folder/Txtfiles/MPCTest.txt", true);
        writer.WriteLine("New score data:");

        theMixer.SetFloat("Torso_Attenuation", 0);
    }
Ejemplo n.º 8
0
 void Start()
 {
     CMCScript = GameObject.Find("Cubeman").GetComponent <CubemanController>();
 }