コード例 #1
0
ファイル: GridDisplay.cs プロジェクト: MurrayVarey/LineEm
    public IEnumerator FlashWinningTiles(LineDefinition winningLine, PostFlashRoutine postFlashRoutine)
    {
        for (int flashCount = 0; flashCount < 6; ++flashCount)
        {
            yield return(new WaitForSeconds(0.15f));

            bool flashOn = flashCount % 2 == 0;

            for (int tileCount = 0; tileCount < 3; ++tileCount)
            {
                Move        tilePosition = winningLine.GetMove(tileCount);
                TileDisplay tileDisplay  = GetTileDisplay(tilePosition);
                tileDisplay.SetWinningFlashMaterial(flashOn);
            }
        }
        postFlashRoutine();
    }