This commit is contained in:
parent
10ecf8c61d
commit
6cbfd2d460
@ -67,6 +67,9 @@ void CNpcFlyingDutchmanEnemy::postInit()
|
||||
|
||||
m_invulnerableTimer = 0;
|
||||
|
||||
m_fadeVal = 128;
|
||||
m_fadeDown = false;
|
||||
|
||||
CNpcBossEnemy::postInit();
|
||||
}
|
||||
|
||||
@ -79,6 +82,35 @@ void CNpcFlyingDutchmanEnemy::think( int _frames )
|
||||
m_invulnerableTimer -= _frames;
|
||||
}
|
||||
|
||||
if ( m_fadeDown )
|
||||
{
|
||||
if ( m_fadeVal > 0 )
|
||||
{
|
||||
m_fadeVal -= _frames;
|
||||
|
||||
if ( m_fadeVal < 0 )
|
||||
{
|
||||
m_fadeVal = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fadeDown = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_fadeVal < 128 )
|
||||
{
|
||||
m_fadeVal += _frames;
|
||||
|
||||
if ( m_fadeVal > 128 )
|
||||
{
|
||||
m_fadeVal = 128;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CNpcEnemy::think( _frames );
|
||||
}
|
||||
|
||||
@ -275,7 +307,7 @@ void CNpcFlyingDutchmanEnemy::processClose( int _frames )
|
||||
|
||||
if ( playerXDistSqr + playerYDistSqr > 100 )
|
||||
{
|
||||
processGenericGotoTarget( _frames, playerXDist, playerYDist, 6 );
|
||||
processGenericGotoTarget( _frames, playerXDist, playerYDist, 8 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -320,6 +352,7 @@ void CNpcFlyingDutchmanEnemy::processShotRecoil( int _frames )
|
||||
{
|
||||
m_state = m_oldState;
|
||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||
m_fadeDown = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -368,6 +401,7 @@ void CNpcFlyingDutchmanEnemy::render()
|
||||
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
||||
setSemiTrans( SprFrame, true );
|
||||
m_actorGfx->RotateScale( SprFrame, renderPos, 0, 4096, 4096 );
|
||||
setRGB0( SprFrame, m_fadeVal, m_fadeVal, m_fadeVal );
|
||||
|
||||
sBBox boundingBox = m_actorGfx->GetBBox();
|
||||
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
||||
|
@ -46,6 +46,8 @@ protected:
|
||||
u8 m_fireCount;
|
||||
s32 m_invulnerableTimer;
|
||||
u8 m_oldState;
|
||||
s16 m_fadeVal;
|
||||
u8 m_fadeDown;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user