From 824a8fdbc695208b2bdf7710716227b95bd79014 Mon Sep 17 00:00:00 2001 From: clement Date: Thu, 18 Jan 2024 12:03:38 +0100 Subject: [PATCH] feat: WIP color --- Assets/script/MoleculeFactory.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Assets/script/MoleculeFactory.cs b/Assets/script/MoleculeFactory.cs index 0d084bd..5cf69c8 100644 --- a/Assets/script/MoleculeFactory.cs +++ b/Assets/script/MoleculeFactory.cs @@ -8,11 +8,13 @@ public class MoleculeFactory : MonoBehaviour{ public TextAsset jsonFile; + //public AtomeFactory atomeFactory = AtomeFactory.getInstrance(this.jsonFile); + private static MoleculeFactory instance; private Molecules moleculesInJson; - private Dictionary moleculesDictionary; + private Dictionary moleculesDictionary; public MoleculeFactory(TextAsset jsonFile){ MoleculeFactory.instance = this; @@ -49,8 +51,10 @@ public class MoleculeFactory : MonoBehaviour{ sphere.transform.parent = sortie.transform; sphere.name = atom.element; sphere.transform.localPosition = new Vector3(atom.geometry[0], atom.geometry[1], atom.geometry[2]); + //AtomeInformation att = Atomfactory.createAtome(atom.element); Color myColor = new Color(0, 0, 1, 1); - ColorUtility.TryParseHtmlString("#0AC742", out myColor); + //TODO géré atom factory + //ColorUtility.TryParseHtmlString(att.representation.color, out myColor); sphere.GetComponent().material.color = myColor; } foreach (Bond bond in molecule.bonds){