Esempio n. 1
0
 public void SetCubePicker(CubePickerController cpc)
 {
     foreach (FallingBlock obj in objects)
     {
         obj.SetCubePicker(cpc);
     }
 }
    private void GameSetUp()
    {
        cubePicker = Instantiate(cubePicker, transform.position, Quaternion.identity);
        cpc        = cubePicker.GetComponent <CubePickerController>();
        cpv        = GameObject.FindGameObjectWithTag("CubePickerView").GetComponent <CubePickerView>();
        cpc.Init(cpv);
        cpc.OnGameWon += GameWon;

        GameObject leftSpawn = Instantiate(fallingBlockSpawner, left, Quaternion.identity);

        leftSpawn.GetComponent <FallingBlockSpawner>().SetCubePicker(cpc);
        GameObject midSpawn = Instantiate(fallingBlockSpawner, mid, Quaternion.identity);

        midSpawn.GetComponent <FallingBlockSpawner>().SetCubePicker(cpc);
        GameObject rightSpawn = Instantiate(fallingBlockSpawner, right, Quaternion.identity);

        rightSpawn.GetComponent <FallingBlockSpawner>().SetCubePicker(cpc);
    }
Esempio n. 3
0
 public void SetCubePicker(CubePickerController cubePickerController)
 {
     this.cubePickerController = cubePickerController;
 }
Esempio n. 4
0
 public void Init(CubePickerController controller)
 {
     this.controller = controller;
 }