// if true means it's piece which is left after row destruction

        private void Start()
        {
            spawnPointY     = transform.position.y;
            moveOffset      = 1.0f;
            minigameManager = GetComponentInParent <MinigameManager>();

            minigameManager.ButtonEvents.OnLeftButtonPressed  += HandleLeftButton;
            minigameManager.ButtonEvents.OnRightButtonPressed += HandleRightButton;
            minigameManager.ButtonEvents.OnUpButtonPressed    += HandleRotation;
            minigameManager.ButtonEvents.OnDownButtonPressed  += HandleDown;

            if (!valid_move())
            {
                // TODO: manage loss
            }
        }
Beispiel #2
0
 private void Start()
 {
     minigameManager = GetComponentInParent <MinigameManager>();
     minigameManager.TetrisEvents.OnTetrisBlockDropped += HandleTetrisDropped;
     SpawnNewPiece();
 }