Ejemplo n.º 1
0
		private void emitterRibbonButton_Click(object sender, EventArgs e)
		{
			UnselectAllTools();
			btnEmitter.Checked = true;

			Emitter emitter = new Emitter(LevelEditor.Level);
			emitter.DefaultValues();

			emitter.Width = 100;
			emitter.Height = 100;

			mParent.SetEditorTool(new DrawEditorTool(emitter, false));
		}
Ejemplo n.º 2
0
		public override object Clone()
		{
			Emitter cpyEmitter = new Emitter(Level);
			base.CloneTo(cpyEmitter);

			cpyEmitter.mImage = mImage;
			cpyEmitter.mEmitImage = mEmitImage;
			cpyEmitter.mTransparancy = mTransparancy;

			cpyEmitter.mChangeOpacity = mChangeOpacity;
			cpyEmitter.mOpacity = (VariableFloat)mOpacity.Clone();

			cpyEmitter.mRandomStartPosition = mRandomStartPosition;
			cpyEmitter.mMaxQuantity = mMaxQuantity;
			cpyEmitter.mRotation = mRotation;

			cpyEmitter.mWidth = mWidth;
			cpyEmitter.mHeight = mHeight;
			cpyEmitter.mEmitAreaMultiplier = (VariableFloat)mEmitAreaMultiplier.Clone();

			cpyEmitter.mEmitRate = (VariableFloat)mEmitRate.Clone();
			cpyEmitter.mTimeBeforeFadeOut = mTimeBeforeFadeOut;
			cpyEmitter.mFadeInTime = mFadeInTime;
			cpyEmitter.mLifeDuration = mLifeDuration;

			cpyEmitter.mChangeScale = mChangeScale;
			cpyEmitter.mMinScale = (VariableFloat)mMinScale.Clone();
			cpyEmitter.mScaleVelocity = (VariableFloat)mScaleVelocity.Clone();
			cpyEmitter.mMaxRandScale = mMaxRandScale;

			cpyEmitter.mChangeVelocity = mChangeVelocity;
			cpyEmitter.mMinVelocityX = (VariableFloat)mMinVelocityX.Clone();
			cpyEmitter.mMinVelocityY = (VariableFloat)mMinVelocityY.Clone();
			cpyEmitter.mMaxVelocityX = mMaxVelocityX;
			cpyEmitter.mMaxVelocityY = mMaxVelocityY;
			cpyEmitter.mAccelerationX = mAccelerationX;
			cpyEmitter.mAccelerationY = mAccelerationY;

			cpyEmitter.mMainVar = mMainVar;
			cpyEmitter.mUnknownEmitRate = mUnknownEmitRate;
			cpyEmitter.mUnknown2 = mUnknown2;

			cpyEmitter.mChangeColour = mChangeColour;
			cpyEmitter.mColourRed = (VariableFloat)mColourRed.Clone();
			cpyEmitter.mColourGreen = (VariableFloat)mColourGreen.Clone();
			cpyEmitter.mColourBlue = (VariableFloat)mColourBlue.Clone();

			cpyEmitter.mChangeDirection = mChangeDirection;
			cpyEmitter.mDirectionSpeed = mDirectionSpeed;
			cpyEmitter.mDirectionRandomSpeed = mDirectionRandomSpeed;
			cpyEmitter.mDirectionAcceleration = mDirectionAcceleration;
			cpyEmitter.mDirectionAngle = mDirectionAngle;
			cpyEmitter.mDirectionRandomAngle = mDirectionRandomAngle;

			cpyEmitter.mChangeUnknown = mChangeUnknown;
			cpyEmitter.mUnknownA = mUnknownA;
			cpyEmitter.mUnknownB = mUnknownB;

			return cpyEmitter;
		}