示例#1
0
        void UpdateListView()
        {
            int count = mPB.GetEmitterCount();

            if (count <= 0)
            {
                return;
            }

            List <string> emitters = new List <string>();
            List <int>    indexes  = new List <int>();

            int j = 0;

            for (int i = 0; j < count; i++)
            {
                ParticleLib.Emitter em = mPB.GetEmitterByIndex(i);

                if (em == null)
                {
                    continue;
                }

                emitters.Add("Emitter" + string.Format("{0:000}", i));
                indexes.Add(i);
                j++;
            }

            mPF.UpdateListView(emitters, indexes);
        }
示例#2
0
        void OnValueChanged(object sender, EventArgs ea)
        {
            if (mCurSelection < 0)
            {
                return;
            }

            ParticleLib.Emitter em = mPB.GetEmitterByIndex(mCurSelection);
            if (em == null)
            {
                return;
            }

            mPF.UpdateEmitter(em);
        }