This commit is contained in:
parent
d128355362
commit
067fa14a2d
2 changed files with 40 additions and 12 deletions
|
@ -71,17 +71,7 @@ void CNpcMotherJellyfishEnemy::postInit()
|
||||||
legs[i]->Setup( legsPos[i].vx, legsPos[i].vy, i > 1 );
|
legs[i]->Setup( legsPos[i].vx, legsPos[i].vy, i > 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*CFXJellyFishLegs *T=(CFXJellyFishLegs*)CFX::Create(CFX::FX_TYPE_JELLYFISH_LEGS,this);
|
m_RGB = 255 + ( 128 << 8 ) + ( 255 << 16 );
|
||||||
T->Setup(80,-5,0);
|
|
||||||
|
|
||||||
T=(CFXJellyFishLegs*)CFX::Create(CFX::FX_TYPE_JELLYFISH_LEGS,this);
|
|
||||||
T->Setup(40,0,0);
|
|
||||||
|
|
||||||
T=(CFXJellyFishLegs*)CFX::Create(CFX::FX_TYPE_JELLYFISH_LEGS,this);
|
|
||||||
T->Setup(-40,-5,1);
|
|
||||||
|
|
||||||
T=(CFXJellyFishLegs*)CFX::Create(CFX::FX_TYPE_JELLYFISH_LEGS,this);
|
|
||||||
T->Setup(-80,0,1);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -427,5 +417,42 @@ void CNpcMotherJellyfishEnemy::processShot( int _frames )
|
||||||
legs[i]->setScale( scale >> 1 );
|
legs[i]->setScale( scale >> 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
CNpcEnemy::processShot( _frames );
|
switch ( m_state )
|
||||||
|
{
|
||||||
|
case NPC_GENERIC_HIT_CHECK_HEALTH:
|
||||||
|
{
|
||||||
|
// do not allow to die, must catch in net
|
||||||
|
|
||||||
|
if ( m_health > 0 )
|
||||||
|
{
|
||||||
|
m_health -= 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
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:
|
||||||
|
{
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_state = 0;
|
||||||
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
u8 CNpcMotherJellyfishEnemy::canBeCaughtByNet()
|
||||||
|
{
|
||||||
|
return( m_isActive && !m_isDying && m_health <= 5 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ public:
|
||||||
void render();
|
void render();
|
||||||
virtual void shutdown();
|
virtual void shutdown();
|
||||||
virtual void setupWaypoints( sThingActor *ThisActor );
|
virtual void setupWaypoints( sThingActor *ThisActor );
|
||||||
|
virtual u8 canBeCaughtByNet();
|
||||||
protected:
|
protected:
|
||||||
virtual void processClose( int _frames );
|
virtual void processClose( int _frames );
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue