void fishDrawSelf(CatLoveDog_InGame *myself) { if (!myself->isPause) { DrawPower(myself); fishMove(myself); fishRun(myself); fishHit(myself); fishOut(myself); } }
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)); }
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); } }
void PowerDrainConnectorObject::refresh(double dt) { DrawPower(PowerDraw); }