示例#1
0
void mainMenu::onInit()
{
	Scene::onInit();
    
    setFaderRGB(0, 0, 0);
    setFaderAlpha(1, 0);
    setFaderSpeed(0.5f);
    startFader(400);
    
    loadResource(0);
}
示例#2
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);
}
示例#3
0
void ShuttleEnergyMeter::setEnergyValue(const int32 value) {
	stopFader();
	FaderMoveSpec moveSpec;
	moveSpec.makeTwoKnotFaderSpec(kFifteenTicksPerSecond, value * 3, value, kFullShuttleEnergy * 3, kFullShuttleEnergy);
	startFader(moveSpec);
}
示例#4
0
void ShuttleEnergyMeter::powerUpMeter() {
	FaderMoveSpec moveSpec;
	moveSpec.makeTwoKnotFaderSpec(kThirtyTicksPerSecond, 0, 0, 45, kFullShuttleEnergy);
	startFader(moveSpec);
}