Beispiel #1
0
        public void ReadFromString(ref uint index, ref string[] nodeParams)
        {
            try
            {
                int count = Convert.ToInt32(nodeParams[index++]);
                for (int i = 0; i < count; i++)
                {
                    string locationValue = nodeParams[index++];
                    // REMOVE THIS TEST AFTER A COUPLE OF VERSIONS (curr v1.5.6 r02)
                    if (locationValue.Equals("Bellow"))
                    {
                        locationValue = "Below";
                    }

                    UsePassLocation location = (UsePassLocation)Enum.Parse(typeof(UsePassLocation), locationValue);
                    string          name     = nodeParams[index++];
                    UsePassItem     newItem  = ScriptableObject.CreateInstance <UsePassItem>();
                    newItem.hideFlags = HideFlags.HideAndDontSave;
                    newItem.Location  = location;
                    newItem.Value     = name;
                    m_items.Add(newItem);
                }
            }
            catch (Exception e)
            {
                Debug.LogException(e);
            }
        }
 public void ReadFromString(ref uint index, ref string[] nodeParams)
 {
     try
     {
         int count = Convert.ToInt32(nodeParams[index++]);
         for (int i = 0; i < count; i++)
         {
             UsePassLocation location = (UsePassLocation)Enum.Parse(typeof(UsePassLocation), nodeParams[index++]);
             string          name     = nodeParams[index++];
             UsePassItem     newItem  = ScriptableObject.CreateInstance <UsePassItem>();
             newItem.hideFlags = HideFlags.HideAndDontSave;
             newItem.Location  = location;
             newItem.Value     = name;
             m_items.Add(newItem);
         }
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
 }
Beispiel #3
0
 public UsePassItem(UsePassLocation location, string name)
 {
     Location = location;
     Value    = name;
 }
Beispiel #4
0
 public UsePassItem()
 {
     Location = UsePassLocation.Above;
     Value    = string.Empty;
 }