Add factory for animated Atome

This commit is contained in:
Mathis 2024-01-26 12:03:56 +01:00
parent 3777d06a0e
commit f7a2cc4c88
20 changed files with 12 additions and 0 deletions

View File

@ -40,10 +40,22 @@ public class AtomeFactory : MonoBehaviour{
public AtomeInformation createAtome(string symbol){ public AtomeInformation createAtome(string symbol){
if(!AtomeDictionary.ContainsKey(symbol)){ if(!AtomeDictionary.ContainsKey(symbol)){
Debug.LogError("Atome does not existe in json"); Debug.LogError("Atome does not existe in json");
return null;
} }
AtomeInformation atome = AtomeDictionary[symbol]; AtomeInformation atome = AtomeDictionary[symbol];
return atome; return atome;
} }
public GameObject createAnimatedAtome(string atome) {
if(!AtomeDictionary.ContainsKey(symbol)){
Debug.LogError("Atome does not existe in json");
return null;
}
AtomeInformation atome = AtomeDictionary[symbol];
//return le gameObject
}
} }