网站首页 单机图文攻略 单机视频攻略 单机游戏攻略 单机游戏问答 游戏常见问题 游戏心得体会 手游图文攻略 手游视频攻略 手游图鉴攻略 手游软件教程 手游攻略问题 网游图文攻略 网游综合攻略 网游游戏问答
当前位置:欢乐游戏吧 > 单机图文攻略 > 

星界边境跃迁显示代码一览 飞船跃迁滚动代码内容

栏目: 单机图文攻略 / 发布于: / 人气:2.36W

下面是文和图。有需要的拿去。虽然我觉得没有多少个人像我一样有这种需要……

截图:

星界边境跃迁显示代码一览 飞船跃迁滚动代码内容

星界边境跃迁显示代码一览 飞船跃迁滚动代码内容 第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();