getName() public méthode

public getName ( ) : string
Résultat string
Exemple #1
0
    public override string ToString()
    {
        string productString = "(null)";

        if (null != _products)
        {
            productString = _products.Count.ToString();
        }
        string mediumString = "(null)";

        if (null != _medium)
        {
            mediumString = "[" + _medium.getName() + ", id#" + _medium.getId() + "]";
        }

        return(string.Format("IReaction[name:{0}, products:{1}, isActive:{2}, medium:{3}, "
                             + "reactionSpeed:{4}, energyCost:{5}, enableSequential:{6}, enableEnergy:{7} ]",
                             _name,                                      //!< The name of the reaction
                             productString,                              //!< The list of products
                             _isActive,                                  //!< Activation boolean
                             mediumString,                               //!< The medium where the reaction will be executed
                             _reactionSpeed,                             //!< Speed coefficient of the reaction
                             _energyCost,                                //!< Energy consumed by the reaction
                             enableSequential,
                             enableEnergy
                             ));
    }
Exemple #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);
 }
Exemple #4
0
 public override string ToString()
 {
     return(string.Format("[FickReaction m1=" + _medium1.getName() + " m2=" + _medium2.getName() + "]"));
 }