Exemplo n.º 1
0
        private void buttonAddAffector_Click(object sender, EventArgs e)
        {
            var selected = (AffectorType)comboBoxAffectors.SelectedItem;
            AffectorWindow aw = new AffectorWindow(selected);
            if(aw.ShowDialog() == DialogResult.OK)
            {
                var affector = aw.Affector;

                m_particleSystem.addAffector(affector);
                listBoxAffectors.Items.Add(affector.type().ToString());

                if(affector.type() == AffectorType.Colour)
                {
                    m_particleSystem.colour = ((ColourAffector)affector).StartColour;
                }
            }
        }
Exemplo n.º 2
0
        private void buttonAddAffector_Click(object sender, EventArgs e)
        {
            var            selected = (AffectorType)comboBoxAffectors.SelectedItem;
            AffectorWindow aw       = new AffectorWindow(selected);

            if (aw.ShowDialog() == DialogResult.OK)
            {
                var affector = aw.Affector;

                m_particleSystem.addAffector(affector);
                listBoxAffectors.Items.Add(affector.type().ToString());

                if (affector.type() == AffectorType.Colour)
                {
                    m_particleSystem.colour = ((ColourAffector)affector).StartColour;
                }
            }
        }