// method: adjust set of aesthetics and play cycling audio // public void adjustSetOfAestheticsAndPlayAudio(SetOfAesthetics setOfAesthetics) { // adjust set of aesthetics // adjustSetOfAesthetics(setOfAesthetics); // play cycling audio // playCyclingAudio(); }
// method: adjust set of aesthetics globally (by both the left and right instances of this class) to the given set of aesthetics, optionally playing cycling audio // public static void adjustSetOfAestheticsGlobally(SetOfAesthetics setOfAesthetics, bool playAudio) { // adjust set of aesthetics for the left instance // left.adjustSetOfAesthetics(setOfAesthetics); // adjust set of aesthetics for the right instance // right.adjustSetOfAesthetics(setOfAesthetics); // optionally have both hands play cycling audio // if (playAudio) { left.playCyclingAudio(); right.playCyclingAudio(); } }
// methods for: set of aesthetics changing in general // // method: adjust the booster's set of aesthetics enabled to be just the given set of aesthetics out of all the managed aesthetics – if a recognized particles script is attached, disable\enable that the way it provides, instead of the object, so that the already-emitted particles don't disappear // (note that this is not intended to support aesthetics shared between boosters, as each aesthetic in the given set is expected to be respective to this booster) public void adjustSetOfAesthetics(SetOfAesthetics setOfAesthetics) { foreach (GameObject aestheticToDisable in managedAesthetics) { if (aestheticToDisable.GetComponent <BoosterJetSmokerings>()) { aestheticToDisable.GetComponent <BoosterJetSmokerings>().enabled = false; BoosterJetSmokerings.appropriatelyTerrainedAtLastUpdate = false; } else if (aestheticToDisable.GetComponent <BoosterJetParticlesToggled>()) { aestheticToDisable.GetComponent <BoosterJetParticlesToggled>().aestheticEnabled = false; } else if (aestheticToDisable.GetComponent <BoosterJetParticlesBriefed>()) { aestheticToDisable.GetComponent <BoosterJetParticlesBriefed>().aestheticEnabled = false; } else { aestheticToDisable.SetActive(false); } } foreach (GameObject aestheticToEnable in setOfAesthetics.array) { if (aestheticToEnable.GetComponent <BoosterJetSmokerings>()) { aestheticToEnable.GetComponent <BoosterJetSmokerings>().enabled = true; } else if (aestheticToEnable.GetComponent <BoosterJetParticlesToggled>()) { aestheticToEnable.GetComponent <BoosterJetParticlesToggled>().aestheticEnabled = true; } else if (aestheticToEnable.GetComponent <BoosterJetParticlesBriefed>()) { aestheticToEnable.GetComponent <BoosterJetParticlesBriefed>().aestheticEnabled = true; } else { aestheticToEnable.SetActive(true); } } }
// method: adjust set of aesthetics globally (by both the left and right instances of this class) to the given set of aesthetics, optionally playing cycling audio // public void adjustSetOfAestheticsGlobally_(SetOfAesthetics setOfAesthetics, bool playAudio) { adjustSetOfAestheticsGlobally(setOfAesthetics, playAudio); }