Exemplo n.º 1
0
 private void ClearGameField()
 {
     while (_lines.Count > 0)
     {
         GameLine line = _lines[0];
         line.Release();
         PoolsContainer.PushObjectByPrefab(line.gameObject, line.PrefabForPulling);
         _lines.RemoveAt(0);
     }
 }
Exemplo n.º 2
0
    private void RegenerateLine()
    {
        GameLine line = _lines[0];

        if (line == _player.CurrentLine)
        {
            _player.Die();
        }
        line.Release();
        PoolsContainer.PushObjectByPrefab(line.gameObject, line.PrefabForPulling);
        _lines.RemoveAt(0);


        AddLineByPrefab(GameFieldSettings.GetRandomPrefab());
        SetLinesPositions();
    }