protected override void Execute(List <GameEntityG> entities)
    {
        var board = GameStateScope.Get <BoardG>().value;

        for (int x = 0; x < board.x; x++)
        {
            var position   = new Vector2Int(x, board.y);
            var nextRowPos = BoardLogic.GetNextEmptyRow(GameScope, position);
            while (nextRowPos != board.y)
            {
                GameScope.CreateRandomPiece(x, nextRowPos);
                nextRowPos = BoardLogic.GetNextEmptyRow(GameScope, position);
            }
        }
    }
Beispiel #2
0
    protected override void Execute(List <GameEntityG> entities)
    {
        var board = GameStateScope.Get <BoardG>().value;

        for (int x = 0; x < board.x; x++)
        {
            for (int y = 1; y < board.y; y++)
            {
                var position = new Vector2Int(x, y);
                var e        = Scope.GetPieceWithPosition(position);
                if (e != null && e.Is <MovableG>())
                {
                    moveDown(e, position);
                }
            }
        }
    }
Beispiel #3
0
 protected override void Execute(List <GameEntityG> entities)
 {
     GameStateScope.Replace(Cache <ScoreG> .I.Set(
                                GameStateScope.Get <ScoreG>().value + entities.Count));
 }