This commit is contained in:
parent
86419daa07
commit
7a1b470103
6 changed files with 75 additions and 8 deletions
|
@ -48,3 +48,69 @@ void CNpcBossEnemy::addHealthMeter()
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcBossEnemy::processShot( int _frames )
|
||||
{
|
||||
switch( m_data[m_type].shotFunc )
|
||||
{
|
||||
case NPC_SHOT_NONE:
|
||||
{
|
||||
// do nothing
|
||||
m_controlFunc = m_oldControlFunc;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case NPC_SHOT_GENERIC:
|
||||
{
|
||||
switch ( m_state )
|
||||
{
|
||||
case NPC_GENERIC_HIT_CHECK_HEALTH:
|
||||
{
|
||||
m_health--;
|
||||
|
||||
if ( m_health <= 0 )
|
||||
{
|
||||
m_state = NPC_GENERIC_HIT_DEATH_START;
|
||||
m_isDying = true;
|
||||
m_health = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_state = NPC_GENERIC_HIT_RECOIL;
|
||||
|
||||
m_animPlaying = true;
|
||||
m_animNo = m_data[m_type].recoilAnim;
|
||||
m_frame = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case NPC_GENERIC_HIT_RECOIL:
|
||||
{
|
||||
processShotRecoil( _frames );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case NPC_GENERIC_HIT_DEATH_START:
|
||||
{
|
||||
processShotDeathStart( _frames );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case NPC_GENERIC_HIT_DEATH_END:
|
||||
{
|
||||
processShotDeathEnd( _frames );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue