Beispiel #1
0
 public void AddParticleSysBone(string name, ParticleSysBone bone)
 {
     if (!particleSysBones.ContainsKey(name))
         particleSysBones.Add(name, bone);
     else
         particleSysBones[name] = bone;
 }
Beispiel #2
0
 public void AddParticleSysBone(string name, ParticleSysBone bone)
 {
     if (!particleSysBones.ContainsKey(name))
     {
         particleSysBones.Add(name, bone);
     }
     else
     {
         particleSysBones[name] = bone;
     }
 }
Beispiel #3
0
 private ParticleSysBone ParseParticleSysBone()
 {
     ParticleSysBone bone = new ParticleSysBone();
     bone.Type = getString();
     while (HasNext())
     {
         string val = getString().ToLower();
         if (val.Contains("followbone:"))
         {
             if (val.Equals("followbone:"))
                 bone.FollowBone = getBool();
             else if (val.Contains("yes"))
                 bone.FollowBone = true;
         }
         else if (val.Contains("fxtrigger:"))
         {
             if (val.Equals("fxtrigger:"))
                 bone.FXTrigger = getString();
             else if (val.Contains("fxtrigger:"))
                 bone.FXTrigger = val.Replace("fxtrigger:", "");
         }
         else if (val.Contains("housecolor:"))
         {
             if (val.Equals("housecolor:"))
                 bone.HouseColor = getBool();
             else if (val.Contains("yes"))
                 bone.HouseColor = true;
         }
         else if (val.Contains("onlyifonland:"))
         {
             if (val.Equals("onlyifonland:"))
                 bone.OnlyIfOnLand = getBool();
             else if (val.Contains("yes"))
                 bone.OnlyIfOnLand = true;
         }
         else if (val.Contains("onlyifonwater:"))
         {
             if (val.Equals("onlyifonwater:"))
                 bone.OnlyIfOnWater = getBool();
             else if (val.Contains("yes"))
                 bone.OnlyIfOnWater = true;
         }
         else if (val.Contains("persist"))
         {
             if (val.Equals("persistid:"))
                 bone.PersistID = getInt();
             else if (val.Contains("persistid:"))
                 bone.PersistID = int.Parse(val.Replace("persistid:", ""));
             else if (val.Equals("persist:"))
                 bone.Persist = getString();
             else if (val.Contains("persist:"))
                 bone.Persist = val.Replace("persist", "");
         }
         else
             PrintError("invalid object: " + val);
     }
     return bone;
 }