Beispiel #1
0
 public MoleculeComponent(ComponentDef componentDef, Molecule _molecule)
 {
     definition     = componentDef;
     molecule       = _molecule;
     state          = (definition.states == null || definition.states.Length < 1) ? "" : definition.states[0];
     localTransform = new RelativeTransform(componentDef.transformOnMolecule);
 }
Beispiel #2
0
 protected void CreateComponent(ComponentDef componentDef)
 {
     if (!components.ContainsKey(componentDef.componentName))
     {
         components.Add(componentDef.componentName, new List <MoleculeComponent>());
     }
     components[componentDef.componentName].Add(new MoleculeComponent(componentDef, this));
 }