示例#1
0
 public PlayerScoresPresentation(DisplayDelegate display, PlayerScoresLogic playerScoresLogic, int pointsToWin, Text scoresText)
 {
     this.display           = display;
     this.playerScoresLogic = playerScoresLogic;
     this.pointsToWin       = pointsToWin;
     this.scoresText        = scoresText;
 }
示例#2
0
    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());
    }
示例#3
0
    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;
    }
示例#4
0
 public WallLogic(PlayerScoresLogic playerScoresLogic, int playerScoreId)
 {
     this.playerScoresLogic = playerScoresLogic;
     this.playerScoreId     = playerScoreId;
 }