public PlayerScoresPresentation(DisplayDelegate display, PlayerScoresLogic playerScoresLogic, int pointsToWin, Text scoresText) { this.display = display; this.playerScoresLogic = playerScoresLogic; this.pointsToWin = pointsToWin; this.scoresText = scoresText; }
public GameLogic(StartCoroutineDelegate startCoroutine, CreateBallDelegate createBall, PlayerScoresLogic playerScoresLogic, PlayerScoresPresentation playerScoresPresentation, GameData gameData) { this.startCoroutine = startCoroutine; this.createBall = createBall; this.playerScoresLogic = playerScoresLogic; this.playerScoresPresentation = playerScoresPresentation; this.gameData = gameData; startCoroutine(GameFlow()); }
void Awake() { const int numPlayers = 2; PlayerScoresLogic = new PlayerScoresLogic(numPlayers, PlayerScoresData.PointsToWin); Text scoresText = GetComponent <Text>(); PlayerScoresPresentation = new PlayerScoresPresentation((visible) => gameObject.SetActive(visible), PlayerScoresLogic, PlayerScoresData.PointsToWin, scoresText); PlayerScoresLogic.OnScoreChanged += PlayerScoresPresentation.UpdateText; }
public WallLogic(PlayerScoresLogic playerScoresLogic, int playerScoreId) { this.playerScoresLogic = playerScoresLogic; this.playerScoreId = playerScoreId; }