// EVALUATE CUSTOM SCALAR// // public void Evaluate_CustomScalar() { foreach (BaseModule m in modules) { if (m.isEnabled) { BaseMultiFunctionModule mfm = m as BaseMultiFunctionModule; if (mfm.modifyCustomScalar) { mfm.Evaluate_CustomScalar(); } } } }
// EVALUATE DEATH DURATION// // public void Evaluate_DeathDuration() { foreach (BaseModule m in modules) { if (m.isEnabled) { BaseMultiFunctionModule mfm = m as BaseMultiFunctionModule; if (mfm.modifyDeathDuration) { mfm.Evaluate_DeathDuration(); } } } }
// EVALUATE SPAWN RATE// // public void Evaluate_SpawnRate() { foreach (BaseModule m in modules) { if (m.isEnabled) { BaseMultiFunctionModule mfm = m as BaseMultiFunctionModule; if (mfm.modifySpawnRate) { mfm.Evaluate_SpawnRate(); } } } }
// EVALUATE PIVOT OFFSET// // public void Evaluate_PivotOffset() { foreach (BaseModule m in modules) { if (m.isEnabled) { BaseMultiFunctionModule mfm = m as BaseMultiFunctionModule; if (mfm.modifyPivotOffset) { mfm.Evaluate_PivotOffset(); } } } }
// EVALUATE VELOCITY// // public void Evaluate_Velocity() { foreach (BaseModule m in modules) { if (m.isEnabled) { BaseMultiFunctionModule mfm = m as BaseMultiFunctionModule; if (mfm.modifyVelocity) { mfm.Evaluate_Velocity(); } } } }
// DUPLICATE SELECTED MODULE // // // Called from a GenericMenu in ShowModules(). public void DuplicateSelectedModule() { int selectedIndex = modules.FindIndex(delegate(BaseModule bm) { return(bm == selectedModule); }); if (ownerBlueprint.ownerEmitter.selectedStack.stackFunction == AmpsHelpers.eStackFunction.MultiFunction) { BaseMultiFunctionModule duplicateModule = ScriptableObject.CreateInstance(selectedModule.GetType()) as BaseMultiFunctionModule; duplicateModule.Initialize(this, ownerBlueprint); duplicateModule.CopyProperties(selectedModule); modules.Insert(selectedIndex + 1, duplicateModule); } else { BaseModule duplicateModule = ScriptableObject.CreateInstance(selectedModule.GetType()) as BaseGenericModule; duplicateModule.Initialize(this, ownerBlueprint); duplicateModule.CopyProperties(selectedModule); modules.Insert(selectedIndex + 1, duplicateModule); } selectedModule = modules[selectedIndex + 1]; ownerBlueprint.ownerEmitter.SoftReset(); }