public override int GetHashCode() { int code = 23; code = code * 31 + ScoreComponents.GetSequenceHashCode(); code = code * 31 + Translation.GetSequenceHashCode(); return(code); }
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; }
/* 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; }
public void SetScoreComponent(ScoreComponents scoreComponents) { this.scoreComponents = scoreComponents; }
public bool Equals(TranslationInfo other) { return(other != null && ScoreComponents.SequenceEqual(other.ScoreComponents) && Translation.SequenceEqual(other.Translation)); }