Ejemplo n.º 1
0
		private void toolStripButtonNewEffect_Click(object sender, EventArgs e)
		{
			var effect = new Effect { Capacity = 1000 };
			effect.Name = "New Effect";
			(treeView.Nodes[0].Tag as ParticleSystem).Effects.Add(effect);

			var node = AddEffectNode(effect);
			treeView.SelectedNode = node;
			node.Expand();

			SetModified(true);
		}
Ejemplo n.º 2
0
		private TreeNode AddEffectNode(Effect effect)
		{
			var node = new TreeNode(effect.Name);
			node.Tag = effect;

			var modOnEmitNode = new TreeNode("Modifiers on Emit");
			modOnEmitNode.Tag = effect.ModifiersOnEmit;
			node.Nodes.Add(modOnEmitNode);

			var modOnUpdateNode = new TreeNode("Modifiers on Update");
			modOnUpdateNode.Tag = effect.ModifiersOnUpdate;
			node.Nodes.Add(modOnUpdateNode);

			treeView.Nodes[0].Nodes.Add(node);
			return node;
		}
Ejemplo n.º 3
0
        internal EffectInstance(Effect effect, ParticleSystemInstance instance)
        {
            if (effect == null)
            {
                throw new ArgumentNullException("effect");
            }
            else if (instance == null)
            {
                throw new ArgumentNullException("instance");
            }
            else if (instance.System != effect.System)
            {
                throw new ArgumentException("Effect and Instance is not from the same ParticleSystem.");
            }

            Effect = effect;
            SystemInstance = instance;
            IsEmitting = effect.EmitOnStart;
            m_oldAlignment = effect.Alignment;
        }