Esempio n. 1
0
    void Start()
    {
        CommonData.Play          = true;
        CommonData.Logo_GameOver = Logo_Game_Over;
        CommonData.Logo_GameOver.SetActive(false);
        CommonData.Logo_Tetris = Logo_Tetris;
        CommonData.Logo_Tetris.SetActive(false);
        CommonData.Logo_Pause = logo_Pause;
        CommonData.Logo_Pause.SetActive(false);
        CommonData.timestep_Go        = false;
        CommonData.Tetris_Logo_bool   = false;
        CommonData.animation_1_active = false;
        CommonData.animation_2_active = false;
        CommonData.compressactive     = false;
        CommonData.stepafteranimation = true;
        CommonData.CommonArr          = new int[CommonData.Height, CommonData.Lenght];
        CommonData.PoolCubes          = new GameObject[CommonData.Height, CommonData.Lenght];
        Parent_lines = new GameObject();

        for (int i = 0; i < CommonData.Height; i++)
        {
            for (int k = 0; k < CommonData.Lenght; k++)
            {
                CommonData.CommonArr[i, k] = 0;
                CommonData.PoolCubes[i, k] = Instantiate(CubePrefab);
            }
        }
        nextElement     = new NextElement();
        blockController = new BlockController(nextElement.GeneretedSBT(CommonData.hint.NumberElement));
        ResetPosition();
        TimeLevelCount = 1;
    }
Esempio n. 2
0
    void ResetGame(BlockController bc)
    {
        CommonData.Play      = true;
        CommonData.CommonArr = new int[CommonData.Height, CommonData.Lenght];
        for (int i = 0; i < CommonData.Height; i++)
        {
            for (int k = 0; k < CommonData.Lenght; k++)
            {
                CommonData.CommonArr[i, k] = 0;
            }
        }
        NextElement nextElement = new NextElement();

        bc.stateBlockTetris = nextElement.GeneretedSBT(CommonData.hint.NumberElement);
        Line_table          = 0;
        Score_table         = 0;
        CommonData.Line     = 0;
        CommonData.Score    = 0;
    }
Esempio n. 3
0
 public void Next_Element(BlockController bc)
 {
     bc.stateBlockTetris = nextElement.GeneretedSBT(CommonData.hint.NumberElement);
 }