開心遊戲館

位置:首頁 > 單機圖文攻略 > 

星界邊境躍遷顯示代碼一覽,飛船躍遷滾動代碼內容

下面是文和圖。有需要的拿去。雖然我覺得沒有多少個人像我一樣有這種需要……

截圖:

星界邊境躍遷顯示代碼一覽 飛船躍遷滾動代碼內容

星界邊境躍遷顯示代碼一覽 飛船躍遷滾動代碼內容 第2張

轉成文字內容:

Void Sky::update(unit64_tcurrtStep) {

m_teStep(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_yDouble(“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_yFloat(“correctionPower”);

M+PlanetOffset -=

M_planetOffset *

M_yFloat(“correctionPower”);

} else if (m_flyingType ==

FlyingType::Interstellar) {

M_flyingVelocity +=

M_flyingAccel *dt *

(int)m_interstellarPhase;

If (m_interstellarPhase)

== InterstellarPhase::Maintain)

{

M_flyingVelocity =

M_yFloat(“flyMax

Velocity”);

tionPower”);

] else if (m_flyingType ==

FlyingType::Interstellar) [

M_flyingVelocity +=

M_flyingAccel * dt *

(int)m_interstellarPhase::Maintain)

{

M_flyingVelocity =

M_yFloat(“flyMax

Velocity”);

} else {

M_flyingVelocity =

Clamp(m_flyingVelocity, 0.0f,

M_yFloat(“flyMaxVelocity”));

}

M_starOffset +=

Vec2F::withAngel(--

getStarRotation(),

M_flyingVelocity * dt *

M_yFloat(“starVelocityFactor”);

M_planetOffset +=

Vec2F::withAngel(--

getPlanetRotation(),

M_flyingVelocity *dt);

If (m_interstellarPhase)

InterstellarPhase::SpeedingUp

&& m_flyingTimer >=

M_yFloat(“speedupTimer”)) {

enterHyperspace();