Пример #1
0
    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);
            }
        }
    }
Пример #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);
                }
            }
        }
    }
Пример #3
0
 protected override void Execute(List <GameEntityG> entities)
 {
     GameStateScope.Replace(Cache <ScoreG> .I.Set(
                                GameStateScope.Get <ScoreG>().value + entities.Count));
 }
Пример #4
0
 public void Initialize()
 {
     GameStateScope.Set(Cache <ScoreG> .I.Set(0));
 }