//// COPY PROPERTIES // //// //override public void CopyProperties(BaseModule originalModule, AmpsBlueprint theOwnerBlueprint) //{ // base.CopyProperties(originalModule, theOwnerBlueprint); // QuickSetupMFModule om = originalModule as QuickSetupMFModule; // if (om != null) // { // spawnRate.CopyProperty(om.spawnRate, theOwnerBlueprint); // deathCondition.CopyProperty(om.deathCondition, theOwnerBlueprint); // acceleration.CopyProperty(om.acceleration, theOwnerBlueprint); // velocity.CopyProperty(om.velocity, theOwnerBlueprint); // position.CopyProperty(om.position, theOwnerBlueprint); // rotationRate.CopyProperty(om.rotationRate, theOwnerBlueprint); // rotation.CopyProperty(om.rotation, theOwnerBlueprint); // scale.CopyProperty(om.scale, theOwnerBlueprint); // color.CopyProperty(om.color, theOwnerBlueprint); // pivotOffset.CopyProperty(om.pivotOffset, theOwnerBlueprint); // } //} //============================================================================// #region GUI // SHOW PROPERTIES // // override public void ShowProperties(ref bool shouldRepaint) { base.ShowProperties(ref shouldRepaint); BaseProperty previousSelection = selectedProperty; PropertyGroup("Spawn rate"); modifySpawnRate.ShowProperty(ref selectedProperty, false); spawnRate.ShowProperty(ref selectedProperty, false); PropertyGroup("Life"); modifyDeathCondition.ShowProperty(ref selectedProperty, false); deathCondition.ShowProperty(ref selectedProperty, false); PropertyGroup("Position"); modifyPosition.ShowProperty(ref selectedProperty, false); position.ShowProperty(ref selectedProperty, false); PropertyGroup("Acceleration"); modifyAcceleration.ShowProperty(ref selectedProperty, false); acceleration.ShowProperty(ref selectedProperty, false); PropertyGroup("Velocity"); modifyVelocity.ShowProperty(ref selectedProperty, false); velocity.ShowProperty(ref selectedProperty, false); PropertyGroup("Rotation"); modifyRotation.ShowProperty(ref selectedProperty, false); rotation.ShowProperty(ref selectedProperty, false); PropertyGroup("Rotation rate"); modifyRotationRate.ShowProperty(ref selectedProperty, false); rotationRate.ShowProperty(ref selectedProperty, false); PropertyGroup("Scale"); modifyScale.ShowProperty(ref selectedProperty, false); scale.ShowProperty(ref selectedProperty, false); PropertyGroup("Color"); modifyColor.ShowProperty(ref selectedProperty, false); color.ShowProperty(ref selectedProperty, false); PropertyGroup("Pivot offset"); modifyPivotOffset.ShowProperty(ref selectedProperty, false); pivotOffset.ShowProperty(ref selectedProperty, false); if (selectedProperty != previousSelection) { shouldRepaint = true; } }
//// COPY PROPERTIES // //// //override public void CopyProperties(BaseModule originalModule, AmpsBlueprint theOwnerBlueprint) //{ // base.CopyProperties(originalModule, theOwnerBlueprint); // ColorModule om = originalModule as ColorModule; // if (om != null) // { // value.CopyProperty(om.value, theOwnerBlueprint); // } //} //// REFERENCE PROPERTIES // //// //override public void ReferenceProperties(BaseModule originalModule) //{ // base.ReferenceProperties(originalModule); // ColorModule om = originalModule as ColorModule; // ReferenceAProperty(value, om, om.value); //} //============================================================================// #region GUI // SHOW PROPERTIES // // override public void ShowProperties(ref bool shouldRepaint) { base.ShowProperties(ref shouldRepaint); BaseProperty previousSelection = selectedProperty; PropertyGroup(""); value.ShowProperty(ref selectedProperty, false); if (selectedProperty != previousSelection) { shouldRepaint = true; } }