void fishDrawSelf(CatLoveDog_InGame *myself) 
{
    if (!myself->isPause) 
	{
      DrawPower(myself);
      fishMove(myself);
      fishRun(myself);
      fishHit(myself);
      fishOut(myself);
    }
 }
예제 #2
0
파일: dsky.cpp 프로젝트: dseagrav/NASSP
void DSKY::SystemTimestep(double simdt)

{
	if (!IsPowered()){ return; }
	//
	// The DSKY power consumption is a little bit hard to figure out. According 
	// to the Systems Handbook the complete interior lightning draws about 30W, so
	// we assume one DSKY draws 10W max, for now. We DO NOT rely on the render code to
	// track the number of lights that are lit, because during pause the still called render 
	// code causes wrong power loads
	//

	//
	// Check the lights.
	//

	LightsLit = 0;
	if (UplinkLit()) LightsLit++;
	if (NoAttLit()) LightsLit++;
	if (StbyLit()) LightsLit++;
	if (KbRelLit() && FlashOn) LightsLit++;
	if (OprErrLit() && FlashOn) LightsLit++;
	if (TempLit()) LightsLit++;
	if (GimbalLockLit()) LightsLit++;
	if (ProgLit()) LightsLit++;
	if (RestartLit()) LightsLit++;
	if (TrackerLit()) LightsLit++;

	//
	// Check the segments
	//

	SegmentsLit = 6;
	if (CompActy) 
		SegmentsLit += 4;

	SegmentsLit += TwoDigitDisplaySegmentsLit(Prog, false);
	SegmentsLit += TwoDigitDisplaySegmentsLit(Verb, VerbFlashing);
	SegmentsLit += TwoDigitDisplaySegmentsLit(Noun, NounFlashing);

	SegmentsLit += SixDigitDisplaySegmentsLit(R1);
	SegmentsLit += SixDigitDisplaySegmentsLit(R2);
	SegmentsLit += SixDigitDisplaySegmentsLit(R3);

	// 10 lights with together max. 6W, 184 segments with together max. 4W  
	DrawPower((LightsLit * 0.6) + (SegmentsLit * 0.022));

	//sprintf(oapiDebugString(), "DSKY %f", (LightsLit * 0.6) + (SegmentsLit * 0.022));
}
예제 #3
0
void TWorldDisplay::Draw(QPainter& painter) {
    Ang += 1.0;

    if (World->RoundStartsAt != uint8_t(-1)) {
        DrawRoundRestart(painter, World->RoundStartsAt);
    } else if (World->WaitingPlayers) {
        DrawWaitingPlayers(painter);
    } else {
        for (size_t i = 0; i < World->Planets.size(); ++i) {
            DrawPlanet(painter, World->Planets[i]);
        }
        for (size_t i = 0; i < World->Ships.size(); ++i) {
            DrawShip(painter, World->Ships[i]);
        }
        DrawPower(painter);
        DrawSelection(painter);
    }
}
예제 #4
0
void PowerDrainConnectorObject::refresh(double dt)

{
	DrawPower(PowerDraw);
}