コード例 #1
0
        /// <summary>
        /// Use this if you are NOT sure the item has this property.
        /// </summary>
        public bool FindPropertyValue(string name, out ItemProperty.Value propertyValue)
        {
            propertyValue = null;

            if (!Initialized)
            {
                Debug.LogError("[SavableItem] - This SavableItem is not initialized, probably it was loaded and not initialized! (call OnLoad() after loading / deserializing).");
                return(false);
            }

            for (int i = 0; i < m_CurrentPropertyValues.Count; i++)
            {
                if (m_CurrentPropertyValues[i].Name == name)
                {
                    propertyValue = m_CurrentPropertyValues[i];
                    return(true);
                }
            }

            return(false);
        }
コード例 #2
0
 private void On_PropertyChanged(ItemProperty.Value propertyValue)
 {
     Updated.Send(this);
 }
コード例 #3
0
 private void On_PropertyChanged(ItemProperty.Value propertyValue)
 {
     PropertyChanged.Send(propertyValue);
 }