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); } } }
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); } } } }
protected override void Execute(List <GameEntityG> entities) { GameStateScope.Replace(Cache <ScoreG> .I.Set( GameStateScope.Get <ScoreG>().value + entities.Count)); }