예제 #1
0
        private void Update(EvaluationContext context)
        {
            if (MaxCount.DirtyFlag.IsDirty)
            {
                int maxCount = MaxCount.GetValue(context);
                ParticleSystem.Value.MaxCount = maxCount;
                ParticleSystem.Value.Init();
            }

            if (MaxEmitRatePerFrame.DirtyFlag.IsDirty)
            {
                MaxEmitRatePerFrame.GetValue(context);
            }
            Log.Info("particle system setup updated");
        }
예제 #2
0
        private void Update(EvaluationContext context)
        {
            if (MaxCount.DirtyFlag.IsDirty)
            {
                int maxCount = MaxCount.GetValue(context);
                Count.Value = maxCount;
                DeadListInitDispatch.Value = new Int3(maxCount / 64, 1, 1);
                UpdateDispatch.Value       = new Int3(maxCount / 64, 1, 1);
            }

            if (MaxEmitRatePerFrame.DirtyFlag.IsDirty)
            {
                EmitDispatch.Value = new Int3(MaxEmitRatePerFrame.GetValue(context), 1, 1);
            }
            Log.Info("constants updated");
        }