Inheritance: MonoBehaviour
Beispiel #1
0
    void OnActivate(bool state)
    {
        MolCheckBoxList p = gameObject.transform.parent.GetComponent <MolCheckBoxList>();

        if (p == null)
        {
            return;
        }
        p.changeMoleculeState(gameObject.GetComponentInChildren <UILabel>().text, state);
    }
Beispiel #2
0
 public bool setMedium(Medium m)
 {
     if (m != null && _graphWindow != null)
       {
     _medium = m;
     _graphWindow.setMedium(_medium);
     _checkBoxes = gameObject.GetComponentInChildren<MolCheckBoxList>();
     if (_checkBoxes != null && _medium != null)
       _checkBoxes.setMedium(_medium);
     UILabel[] labelTab = gameObject.GetComponentsInChildren<UILabel>();
     foreach (UILabel l in labelTab)
       if (l.name == "Title")
         l.text = m.getName();
     return true;
       }
     return false;
 }
 public bool setMedium(Medium m)
 {
     if (m != null && _graphWindow != null)
     {
         _medium = m;
         _graphWindow.setMedium(_medium);
         _checkBoxes = gameObject.GetComponentInChildren <MolCheckBoxList>();
         if (_checkBoxes != null && _medium != null)
         {
             _checkBoxes.setMedium(_medium);
         }
         UILabel[] labelTab = gameObject.GetComponentsInChildren <UILabel>();
         foreach (UILabel l in labelTab)
         {
             if (l.name == "Title")
             {
                 l.text = m.getName();
             }
         }
         return(true);
     }
     return(false);
 }