Création du prefab et script de l'atom + ajout du lock mode
This commit is contained in:
@ -37,7 +37,13 @@ public class AtomeFactory : MonoBehaviour{
|
||||
return AtomeFactory.instance;
|
||||
}
|
||||
|
||||
public AtomeInformation createAtome(string symbol){
|
||||
public bool hasAtome(String symbol)
|
||||
{
|
||||
return AtomeDictionary.ContainsKey(symbol);
|
||||
}
|
||||
|
||||
|
||||
public AtomeInformation createAtome(string symbol){
|
||||
if(!AtomeDictionary.ContainsKey(symbol)){
|
||||
Debug.LogError("Atome does not existe in json");
|
||||
}
|
||||
|
@ -104,6 +104,11 @@ public class MoleculeFactory : MonoBehaviour{
|
||||
this.atomeFactory = atomeFactory;
|
||||
}
|
||||
|
||||
public AtomeFactory GetAtomFactory()
|
||||
{
|
||||
return this.atomeFactory;
|
||||
}
|
||||
|
||||
private GameObject CreateCylinderBetweenPoints(Vector3 start, Vector3 end, float width){
|
||||
var offset = end - start;
|
||||
var scale = new Vector3(width, offset.magnitude / 2.0f, width);
|
||||
|
Reference in New Issue
Block a user