Example #1
0
    void ApplyCurNudge()
    {
        Mino target      = null;
        bool targetFound = false;

        for (int i = curCoord.y; i < manager.gridSize.y; i++)
        {
            if (manager.gridE[curCoord.x, i].state == bState.mblock)
            {
                target      = manager.gridE[curCoord.x, i].transform.parent.GetComponent <Mino>();
                targetFound = true;
                break;
            }
        }

        if (targetFound)
        {
            target.Nudge(curShot);
        }
        else
        {
            manager.invalidSFO.GetComponent <AudioSource>().Play();
        }

        curShot  = nextShot;
        nextShot = GetRandomShot();

        return;
    }