void mainMenu::onInit() { Scene::onInit(); setFaderRGB(0, 0, 0); setFaderAlpha(1, 0); setFaderSpeed(0.5f); startFader(400); loadResource(0); }
void ShuttleEnergyMeter::drainForTractorBeam() { stopFader(); TimeValue startTime = 0, stopTime; int32 startValue = getFaderValue(), stopValue; if (startValue < kTractorBeamEnergy) { stopTime = startValue * kTractorBeamTime / kTractorBeamEnergy; stopValue = 0; } else { stopTime = kTractorBeamTime; stopValue = startValue - kTractorBeamEnergy; } FaderMoveSpec moveSpec; moveSpec.makeTwoKnotFaderSpec(kTractorBeamScale, startTime, startValue, stopTime, stopValue); startFader(moveSpec); }
void ShuttleEnergyMeter::setEnergyValue(const int32 value) { stopFader(); FaderMoveSpec moveSpec; moveSpec.makeTwoKnotFaderSpec(kFifteenTicksPerSecond, value * 3, value, kFullShuttleEnergy * 3, kFullShuttleEnergy); startFader(moveSpec); }
void ShuttleEnergyMeter::powerUpMeter() { FaderMoveSpec moveSpec; moveSpec.makeTwoKnotFaderSpec(kThirtyTicksPerSecond, 0, 0, 45, kFullShuttleEnergy); startFader(moveSpec); }