public void ReadState()
    {
        cubeState = FindObjectOfType <CubeState>();
        cubeMap   = FindObjectOfType <CubeMap>();

        cubeState.up    = ReadFace(upRays, tUp);
        cubeState.down  = ReadFace(downRays, tDown);
        cubeState.left  = ReadFace(leftRays, tLeft);
        cubeState.right = ReadFace(rightRays, tRight);
        cubeState.front = ReadFace(frontRays, tFront);
        cubeState.back  = ReadFace(backRays, tBack);

        cubeMap.Set();
    }
Exemplo n.º 2
0
    public void ReadState()
    {
        cubeState = FindObjectOfType <CubeState>();
        cubeMap   = FindObjectOfType <CubeMap>();

        // set the state of each position in the list of sides so we know
        // what color is in what position
        cubeState.up    = ReadFace(upRays, tUp);
        cubeState.down  = ReadFace(downRays, tDown);
        cubeState.left  = ReadFace(leftRays, tLeft);
        cubeState.right = ReadFace(rightRays, tRight);
        cubeState.front = ReadFace(frontRays, tFront);
        cubeState.back  = ReadFace(backRays, tBack);

        // update the map with the found positions
        cubeMap.Set();
    }
Exemplo n.º 3
0
    public void ReadState()
    {
        cubeState = FindObjectOfType <CubeState>();
        cubeMap   = FindObjectOfType <CubeMap>();

        //readface는 6번 도니까 6번 타이핑할거임
        //여기 readCube 스크립트에서 바로 CubeState의 up을 업로드해줄거임
        cubeState.up = ReadFace(upRays, tUp);
        //tUp은 start하자마자 SetRayTransforms()함수에서 buildray()함수로 90도 돌려서 중앙을 바라보고있음
        cubeState.down  = ReadFace(downRays, tDown);
        cubeState.left  = ReadFace(leftRays, tLeft);
        cubeState.right = ReadFace(rightRays, tRight);
        cubeState.front = ReadFace(frontRays, tFront);
        cubeState.back  = ReadFace(backRays, tBack);

        // CubeState 구청에 모든 서류가 전달되었으므로 Set()함수씀
        cubeMap.Set(); //CubeState 구청자료를 cubeMap현장 ui패널에 대입
    }