Ejemplo n.º 1
0
            public override int GetHashCode()
            {
                int code = 23;

                code = code * 31 + ScoreComponents.GetSequenceHashCode();
                code = code * 31 + Translation.GetSequenceHashCode();
                return(code);
            }
Ejemplo n.º 2
0
    private void LoadScore()
    {
        ScoreComponents scoreComponents = GameObject.Find("Communicator").GetComponent <Communicator>().scoreComponents;

        timeLeft  = scoreComponents.maxTime - scoreComponents.timeTaken;
        timeTotal = scoreComponents.maxTime;

        moveUsed    = scoreComponents.moves;
        movePerfect = scoreComponents.movePerfect;
    }
Ejemplo n.º 3
0
    /* Loads Score from persistent GameObject whose purpose is to communicate between scenes */
    private void LoadScoreComponents()
    {
        ScoreComponents scoreComponents = GameObject.Find("Communicator").GetComponent <Communicator>().scoreComponents;

        timeLeft  = scoreComponents.timeTaken;
        timeTotal = scoreComponents.maxTime;

        moveUsed    = scoreComponents.moves;
        movePerfect = scoreComponents.movePerfect;

        virus = scoreComponents.amountOfVirusFlipped;

        cardsMatched = scoreComponents.matchedCards;
        ingredients  = scoreComponents.ingredients;
        ingPoints    = GetIngredientsFraction();
        won          = (ingPoints == 1) ? true : false;
    }
Ejemplo n.º 4
0
 public void SetScoreComponent(ScoreComponents scoreComponents)
 {
     this.scoreComponents = scoreComponents;
 }
Ejemplo n.º 5
0
 public bool Equals(TranslationInfo other)
 {
     return(other != null && ScoreComponents.SequenceEqual(other.ScoreComponents) &&
            Translation.SequenceEqual(other.Translation));
 }