Пример #1
0
    public void UpdateScore(SoccerLevel level)
    {
        score = level.PointsReceived;

        string newText = score.ToString();

        scoreText.text = newText;
    }
Пример #2
0
    public void UpdateTotalScore(SoccerLevel level)
    {
        totalScore = SoccerManager.Instance.totalPoints;

        string newText = totalScore.ToString();

        totalScoreText.text = newText;
    }
Пример #3
0
    public void UptadePartialScore(SoccerLevel level)
    {
        TimeScore();
        level.PointsReceived += value;

        //score = level.PointsReceived;

        partialValue = level.PointsReceived;
        //SoccerManager.Instance.totalPoints += value;
        string newText = partialValue.ToString();

        scoreGraphText.text = newText;
    }
    private SoccerLevel[] GetLevels()
    {
        //todo: make this customization into a tool/custom inspector
        SoccerLevel[] newLevels = new SoccerLevel[5];

        #region Create possible Challenges
        ChallengeType[] possibleFirstLevel = new ChallengeType[1];
        possibleFirstLevel[0] = ChallengeType.Golden;

        ChallengeType[] possibleSecondLevel = new ChallengeType[1];
        possibleSecondLevel[0] = ChallengeType.Unit;

        ChallengeType[] possibleThirdLevel = new ChallengeType[2];
        possibleThirdLevel[0] = ChallengeType.Ten;
        possibleThirdLevel[1] = ChallengeType.TenSpare;

        ChallengeType[] possibleFourthLevel = new ChallengeType[1];
        possibleFourthLevel[0] = ChallengeType.UnitSub;

        //teste
        ChallengeType[] possibleFifthLevel = new ChallengeType[2];
        possibleFifthLevel[0] = ChallengeType.TenSub;
        possibleFifthLevel[1] = ChallengeType.TenSubSpare;

        ChallengeType[] possibleSixthLevel = new ChallengeType[2];
        possibleSixthLevel[0] = ChallengeType.TenSpare;
        possibleSixthLevel[1] = ChallengeType.TenSubSpare;

        #endregion

        #region Create Possible Levels

        newLevels[0] = new SoccerLevel(possibleFirstLevel, 10);
        newLevels[1] = new SoccerLevel(possibleSecondLevel, 10);
        newLevels[2] = new SoccerLevel(possibleThirdLevel, 10);
        newLevels[3] = new SoccerLevel(possibleFourthLevel, 10);
        newLevels[4] = new SoccerLevel(possibleFifthLevel, 10);
        //newLevels[5] = new SoccerLevel(possibleFourthLevel, 10);

        #endregion


        return(newLevels);
    }
Пример #5
0
 public void DisplayTotalScore(SoccerLevel level)
 {
     UpdateTotalScore(level);
 }
Пример #6
0
 public void DisplayPartialScore(SoccerLevel level)
 {
     UptadePartialScore(level);
 }
Пример #7
0
 public void DisplayScore(SoccerLevel level)
 {
     UpdateScore(level);
 }