normalent on est quasi bon

This commit is contained in:
clement 2024-01-11 17:11:59 +01:00
parent 33e34e9fde
commit e12fed0489

View File

@ -42,11 +42,17 @@ public class MoleculeFactory : MonoBehaviour{
Debug.LogError("molecules does not existe in json")
}
Molecule molecule = moleculesDictionary[formula];
Debug.Log(molecule);
//return GO
return null;
GameObject sortie = new GameObject(molecule.name);
foreach (Atom atom in molecule.atoms) {
GameObject Sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
sphere.transform.parent = sortie.transform;
sphere.name = atom.element;
sphere.transform.localPosition = new Vector3(atom.geometry[0], atom.geometry[1], atom.geometry[2]);
//TODO: géré la taille de l'atome
//TODO: géré la couleur de l'atome
}
return sortie;
}
}