develop #12
@ -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
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user