星界邊境躍遷顯示代碼一覽 飛船躍遷滾動代碼內容
下面是文和圖。有需要的拿去。雖然我覺得沒有多少個人像我一樣有這種需要……
截圖:
轉成文本內容:
Void Sky::update(unit64_tcurrtStep) {
m_netStates.updateStep(currentStep);)
Double dt = WorldTimesetp
If (m_referenceClock) {
double clockTime = m_referenceClock-}time();
If
(isnan(m_clockTrackingTime)) {
M_clockTrackingTime =
clockTime;
} else {
//if our reference clock is set,and we have a valid tracking time ,then
//slowly adjust time towards the tracking time based on the
// ‘clockTrackingFctor’setting.
Double clockDiff = clockTime -
M_clockTrackingTime;
Double adjustment =
clockDiff *
m_settings.queryDouble(“clock
TrackingFactor”);
Dt = adjustmen;
M_clockTrackingTime +=
Adjustment;
}
}
M_time += dt;
m_flashTimer = std::max(0.0,
M_flashTimer - dt);
If (flying()) {
m_flyingTimer += dt;
If (m_flyingType ==
FlyingType::Disembarking) {
Bool finished =
M_starOffset -=
M_starOffset *
M_settings.queryFloat(“correctionPower”);
M+planetOffset -=
M_planetOffset *
M_settings.queryFloat(“correctionPower”);
} else if (m_flyingType ==
FlyingType::Interstellar) {
M_flyingVelocity +=
M_flyingAccel *dt *
(int)m_interstellarPhase;
If (m_interstellarPhase)
== InterstellarPhase::Maintain)
{
M_flyingVelocity =
M_settings.queryFloat(“flyMax
Velocity”);
tionPower”);
] else if (m_flyingType ==
FlyingType::Interstellar) [
M_flyingVelocity +=
M_flyingAccel * dt *
(int)m_interstellarPhase::Maintain)
{
M_flyingVelocity =
M_settings.queryFloat(“flyMax
Velocity”);
} else {
M_flyingVelocity =
Clamp(m_flyingVelocity, 0.0f,
M_settings.queryFloat(“flyMaxVelocity”));
}
M_starOffset +=
Vec2F::withAngel(--
getStarRotation(),
M_flyingVelocity * dt *
M_settings.queryFloat(“starVelocityFactor”);
M_planetOffset +=
Vec2F::withAngel(--
getPlanetRotation(),
M_flyingVelocity *dt);
If (m_interstellarPhase)
InterstellarPhase::SpeedingUp
&& m_flyingTimer >=
M_settings.queryFloat(“speedupTimer”)) {
enterHyperspace();