예제 #1
0
    public Stage2(Pivot_code p, Core c)
    {
        pivot_c = p;
        core    = c;

        top_cube = core.getTop().GetComponent <Cube>();
    }
예제 #2
0
 private void Start()
 {
     pivot         = GameObject.Find("Pivot");
     pivot_c       = pivot.GetComponent <Pivot_code>();
     action        = 0;
     solution      = GetComponent <Solution>();
     long_test_num = Random.Range(5, 15);
 }
예제 #3
0
    public Stage3(Pivot_code p, Core c)
    {
        pivot_c = p;
        core    = c;

        cubes       = filterCubes(core.getCubes(2));
        bottomColor = core.getBottom().GetComponent <Cube>().getColors()[0];
        reversed    = null;
    }
예제 #4
0
    public void init()
    {
        working = true;
        core    = GetComponent <Core>();
        action  = 1;

        pivot_c = GameObject.Find("Pivot").GetComponent <Pivot_code>();

        s1 = new Stage1(pivot_c, core);
        s2 = new Stage2(pivot_c, core);
        s3 = new Stage3(pivot_c, core);
    }
예제 #5
0
    public Stage1(Pivot_code p, Core c)
    {
        pivot_c = p;
        core    = c;

        top_cube       = core.getTop().GetComponent <Cube>();
        top_cube_color = top_cube.GetComponent <Cube>().getColors()[0];

        cubes      = core.getCubes(2, top_cube_color);
        sideColors = core.getCubesBySize(1);

        cubeToDo = null;
    }
예제 #6
0
    public Task(string side, int direction)
    {
        relevant  = true;
        this.side = side;

        if (direction == 0)
        {
            this.direction = (Random.Range(0, 2) == 1)? 1 : -1;
        }
        else
        {
            this.direction = direction;
        }

        pivot_c = GameObject.Find("Pivot").GetComponent <Pivot_code>();
        core    = GameObject.Find("CubeCenter").GetComponent <Core>();
    }