string getText(GameObject GO) { ReferenceDinosaure rd = GO.GetComponent <ReferenceDinosaure>(); string s = "Cet oiseau ressemble à ce dinosaure:\n\nNom : " + rd.refDinoName + "\n\n"; s += "De l'ère : " + rd.era + "\n"; s += rd.description + "\n"; s += rd.particularity + "\n"; s += "Poids : " + rd.weight + "\n"; s += "Taille : " + rd.height + "\n"; return(s); }
bool isClosedRoRef(GameObject GO, GameObject r) { Level levelGO = GO.GetComponent <Level>(); ReferenceDinosaure levelRef = r.GetComponent <ReferenceDinosaure>(); foreach (string s in levelGO.components) { if (!levelRef.components.Contains(s)) { return(false); } } return(true); }