// Move to editor class. // Quality assinging field make much overhead as they are called every frame. // Since it is an editor, we may stay it for a while, but sometimes we surely need to fix this problem. /// <summary> /// Displays the details editor. /// </summary> public override void DisplayDetailsEditor() { base.DisplayDetailsEditor (); m_QualityIndex = (m_Quality == null) ? 0 : DatabaseManager.QualityDatabase.GetIndexByName (m_Quality.Name); m_QualityIndex = EditorGUILayout.Popup ("Quality type: ", m_QualityIndex, DatabaseManager.QualityDatabase.NamesAsStringArray()); m_Quality = DatabaseManager.QualityDatabase.Get (m_QualityIndex); m_Description = EditorGUILayout.TextField ("Description: ", m_Description); m_Price = EditorGUILayout.IntField ("Price: ", m_Price); m_Weight = EditorGUILayout.IntField ("Weight: ", m_Weight); }
/// <summary> /// Prototyping constructor. /// Initializes a new instance of the <see cref="RPG.ItemSystem.ISQuality"/> class using values of the other instance of that class. /// </summary> /// <param name="RHS">Instance, used as a prototype.</param> public ISQuality(ISQuality RHS) { base.Clone (RHS); }
/// <summary> /// Makes this instance a clone of the specified Prototype. /// </summary> /// <param name="Prototype">Prototype.</param> public void Clone(ISObject Prototype) { base.Clone (Prototype); m_Quality = Prototype.Quality; m_Description = Prototype.Description; m_Price = Prototype.Price; m_Weight = Prototype.Weight; }