public override void UpdateStyle(BehaviorEntity.BEHStyleMetadata style)
 {
     for (int ii = 0; ii < all.Length; ++ii)
     {
         all[ii].UpdateStyle(style);
     }
 }
        public override void UpdateStyle(BehaviorEntity.BEHStyleMetadata style)
        {
            LoadDefaults(); //This may be called before Awake through BEH.Awake
            var m = particles.main;

            if (style.recolor?.palette != null && colorFromPalette >= 0)
            {
                m.startColor =
                    new ParticleSystem.MinMaxGradient(style.recolor.palette.Gradient.Evaluate(colorFromPalette)
                                                      .WithA(defaultGrad.color.a));
            }
            else
            {
                m.startColor = defaultGrad;
            }
        }
Exemple #3
0
 //No copy functionality
 public static bool CheckComplexPool(string pool, out BehaviorEntity.BEHStyleMetadata bsm)
 {
     if (behPools.TryGetValue(pool, out bsm))
     {
         if (!bsm.Active)
         {
             bsm.Activate();
         }
         return(true);
     }
     else if (IsPlayerPoolString(pool))
     {
         return(CheckComplexPool(GetOrMakeComplexPlayerCopy(pool.Substring(PLAYERPREFIX.Length)), out bsm));
     }
     else
     {
         return(false);
     }
 }