This commit is contained in:
parent
e1ff8eb3c6
commit
eef4e8dc39
16 changed files with 64 additions and 99 deletions
|
@ -88,7 +88,8 @@ enemy_src := npc \
|
||||||
nsj2back \
|
nsj2back \
|
||||||
nbuttfly \
|
nbuttfly \
|
||||||
nshell \
|
nshell \
|
||||||
nssnake
|
nssnake \
|
||||||
|
nboss
|
||||||
|
|
||||||
friend_src := friend \
|
friend_src := friend \
|
||||||
fdata \
|
fdata \
|
||||||
|
|
|
@ -49,7 +49,6 @@ void CNpcIronDogfishEnemy::postInit()
|
||||||
m_npcPath.setPathType( CNpcPath::PONG_PATH );
|
m_npcPath.setPathType( CNpcPath::PONG_PATH );
|
||||||
m_steamTimer = 0;
|
m_steamTimer = 0;
|
||||||
m_vulnerableTimer = 0;
|
m_vulnerableTimer = 0;
|
||||||
m_meterOn=false;
|
|
||||||
|
|
||||||
if ( CLevel::getIsBossRespawn() )
|
if ( CLevel::getIsBossRespawn() )
|
||||||
{
|
{
|
||||||
|
@ -57,7 +56,7 @@ void CNpcIronDogfishEnemy::postInit()
|
||||||
m_speed = m_data[m_type].speed + ( ( 3 * ( m_data[m_type].initHealth - m_health ) ) / m_data[m_type].initHealth );
|
m_speed = m_data[m_type].speed + ( ( 3 * ( m_data[m_type].initHealth - m_health ) ) / m_data[m_type].initHealth );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_energyBar = NULL;
|
CNpcBossEnemy::postInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -552,12 +551,7 @@ void CNpcIronDogfishEnemy::shutdown()
|
||||||
CLevel::setBossHealth( m_health );
|
CLevel::setBossHealth( m_health );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_energyBar )
|
CNpcBossEnemy::shutdown();
|
||||||
{
|
|
||||||
m_energyBar->setToShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
CNpcEnemy::shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -572,13 +566,6 @@ void CNpcIronDogfishEnemy::render()
|
||||||
|
|
||||||
if (canRender())
|
if (canRender())
|
||||||
{
|
{
|
||||||
if (!m_meterOn)
|
|
||||||
{
|
|
||||||
m_energyBar=(CFXNRGBar*)CFX::Create(CFX::FX_TYPE_NRG_BAR,this);
|
|
||||||
m_energyBar->SetMax(m_data[m_type].initHealth);
|
|
||||||
m_meterOn=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
DVECTOR &renderPos=getRenderPos();
|
DVECTOR &renderPos=getRenderPos();
|
||||||
|
|
||||||
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
||||||
|
|
|
@ -16,10 +16,13 @@
|
||||||
|
|
||||||
#include "fx\fx.h"
|
#include "fx\fx.h"
|
||||||
#include "fx\fxlaser.h"
|
#include "fx\fxlaser.h"
|
||||||
#include "fx\fxnrgbar.h"
|
|
||||||
|
#ifndef __ENEMY_NBOSS_H__
|
||||||
|
#include "enemy\nboss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class CNpcIronDogfishEnemy : public CNpcEnemy
|
class CNpcIronDogfishEnemy : public CNpcBossEnemy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
|
@ -52,10 +55,8 @@ protected:
|
||||||
s32 m_steamTimer;
|
s32 m_steamTimer;
|
||||||
s32 m_vulnerableTimer;
|
s32 m_vulnerableTimer;
|
||||||
s32 m_laserTimer;
|
s32 m_laserTimer;
|
||||||
bool m_meterOn;
|
|
||||||
|
|
||||||
CFXLaser *m_effect;
|
CFXLaser *m_effect;
|
||||||
CFXNRGBar *m_energyBar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -231,6 +231,9 @@ void CNpcEyeballEnemy::processEvent( GAME_EVENT evt, CThing *sourceThing )
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ void CNpcFlyingDutchmanEnemy::postInit()
|
||||||
m_npcPath.getPathYExtents( &m_minY, &m_maxY );
|
m_npcPath.getPathYExtents( &m_minY, &m_maxY );
|
||||||
|
|
||||||
m_extension = minX;
|
m_extension = minX;
|
||||||
m_meterOn=false;
|
|
||||||
m_inRange = false;
|
m_inRange = false;
|
||||||
|
|
||||||
if ( CLevel::getIsBossRespawn() )
|
if ( CLevel::getIsBossRespawn() )
|
||||||
|
@ -68,7 +67,7 @@ void CNpcFlyingDutchmanEnemy::postInit()
|
||||||
|
|
||||||
m_invulnerableTimer = 0;
|
m_invulnerableTimer = 0;
|
||||||
|
|
||||||
m_energyBar = NULL;
|
CNpcBossEnemy::postInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -342,12 +341,7 @@ void CNpcFlyingDutchmanEnemy::shutdown()
|
||||||
CLevel::setBossHealth( m_health );
|
CLevel::setBossHealth( m_health );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_energyBar )
|
CNpcBossEnemy::shutdown();
|
||||||
{
|
|
||||||
m_energyBar->setToShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
CNpcEnemy::shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -362,13 +356,6 @@ void CNpcFlyingDutchmanEnemy::render()
|
||||||
|
|
||||||
if (canRender())
|
if (canRender())
|
||||||
{
|
{
|
||||||
if (!m_meterOn)
|
|
||||||
{
|
|
||||||
m_energyBar=(CFXNRGBar*)CFX::Create(CFX::FX_TYPE_NRG_BAR,this);
|
|
||||||
m_energyBar->SetMax(m_data[m_type].initHealth);
|
|
||||||
m_meterOn=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
DVECTOR &renderPos=getRenderPos();
|
DVECTOR &renderPos=getRenderPos();
|
||||||
|
|
||||||
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
||||||
|
|
|
@ -14,11 +14,12 @@
|
||||||
#ifndef __ENEMY_NFDUTCH_H__
|
#ifndef __ENEMY_NFDUTCH_H__
|
||||||
#define __ENEMY_NFDUTCH_H__
|
#define __ENEMY_NFDUTCH_H__
|
||||||
|
|
||||||
#include "fx\fx.h"
|
#ifndef __ENEMY_NBOSS_H__
|
||||||
#include "fx\fxnrgbar.h"
|
#include "enemy\nboss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class CNpcFlyingDutchmanEnemy : public CNpcEnemy
|
class CNpcFlyingDutchmanEnemy : public CNpcBossEnemy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void think( int _frames );
|
virtual void think( int _frames );
|
||||||
|
@ -40,11 +41,9 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 m_minY, m_maxY;
|
s32 m_minY, m_maxY;
|
||||||
bool m_meterOn;
|
|
||||||
u8 m_inRange;
|
u8 m_inRange;
|
||||||
u8 m_fireCount;
|
u8 m_fireCount;
|
||||||
s32 m_invulnerableTimer;
|
s32 m_invulnerableTimer;
|
||||||
CFXNRGBar *m_energyBar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -50,7 +50,6 @@ void CNpcMotherJellyfishEnemy::postInit()
|
||||||
{
|
{
|
||||||
m_state = MOTHER_JELLYFISH_CYCLE;
|
m_state = MOTHER_JELLYFISH_CYCLE;
|
||||||
m_spawnTimer = 0;
|
m_spawnTimer = 0;
|
||||||
m_meterOn=false;
|
|
||||||
|
|
||||||
if ( CLevel::getIsBossRespawn() )
|
if ( CLevel::getIsBossRespawn() )
|
||||||
{
|
{
|
||||||
|
@ -93,7 +92,7 @@ void CNpcMotherJellyfishEnemy::postInit()
|
||||||
|
|
||||||
m_attackCounter = 0;
|
m_attackCounter = 0;
|
||||||
|
|
||||||
m_energyBar = NULL;
|
CNpcBossEnemy::postInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -584,12 +583,7 @@ void CNpcMotherJellyfishEnemy::shutdown()
|
||||||
CLevel::setBossHealth( m_health );
|
CLevel::setBossHealth( m_health );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_energyBar )
|
CNpcBossEnemy::shutdown();
|
||||||
{
|
|
||||||
m_energyBar->setToShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
CNpcEnemy::shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -633,13 +627,6 @@ void CNpcMotherJellyfishEnemy::render()
|
||||||
|
|
||||||
if (canRender())
|
if (canRender())
|
||||||
{
|
{
|
||||||
if (!m_meterOn)
|
|
||||||
{
|
|
||||||
m_energyBar=(CFXNRGBar*)CFX::Create(CFX::FX_TYPE_NRG_BAR,this);
|
|
||||||
m_energyBar->SetMax(m_data[m_type].initHealth);
|
|
||||||
m_meterOn=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
DVECTOR &renderPos=getRenderPos();
|
DVECTOR &renderPos=getRenderPos();
|
||||||
|
|
||||||
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),false);
|
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),false);
|
||||||
|
|
|
@ -14,14 +14,17 @@
|
||||||
#ifndef __ENEMY_NMJFISH_H__
|
#ifndef __ENEMY_NMJFISH_H__
|
||||||
#define __ENEMY_NMJFISH_H__
|
#define __ENEMY_NMJFISH_H__
|
||||||
|
|
||||||
|
#ifndef __ENEMY_NBOSS_H__
|
||||||
|
#include "enemy\nboss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "fx\fx.h"
|
#include "fx\fx.h"
|
||||||
#include "fx\fxjfish.h"
|
#include "fx\fxjfish.h"
|
||||||
#include "fx\fxnrgbar.h"
|
|
||||||
|
|
||||||
#define MJ_PINK ( 255 + ( 128 << 8 ) + ( 255 << 16 ) )
|
#define MJ_PINK ( 255 + ( 128 << 8 ) + ( 255 << 16 ) )
|
||||||
#define MJ_WHITE ( 255 + ( 255 << 8 ) + ( 255 << 16 ) )
|
#define MJ_WHITE ( 255 + ( 255 << 8 ) + ( 255 << 16 ) )
|
||||||
|
|
||||||
class CNpcMotherJellyfishEnemy : public CNpcEnemy
|
class CNpcMotherJellyfishEnemy : public CNpcBossEnemy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
|
@ -62,7 +65,6 @@ protected:
|
||||||
s32 m_maxPauseTimer;
|
s32 m_maxPauseTimer;
|
||||||
s32 m_cycleWidth;
|
s32 m_cycleWidth;
|
||||||
s32 m_halfCycleWidth;
|
s32 m_halfCycleWidth;
|
||||||
bool m_meterOn;
|
|
||||||
s16 m_renderScale;
|
s16 m_renderScale;
|
||||||
s32 m_invulnerableTimer;
|
s32 m_invulnerableTimer;
|
||||||
u8 m_attackCounter;
|
u8 m_attackCounter;
|
||||||
|
@ -71,7 +73,6 @@ protected:
|
||||||
DVECTOR legsPos[4];
|
DVECTOR legsPos[4];
|
||||||
|
|
||||||
DVECTOR targetPos;
|
DVECTOR targetPos;
|
||||||
CFXNRGBar *m_energyBar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -207,6 +207,10 @@
|
||||||
#include "enemy\nprojjf.h"
|
#include "enemy\nprojjf.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ENEMY_NBOSS_H__
|
||||||
|
#include "enemy\nboss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Enemy NPCs
|
// Enemy NPCs
|
||||||
|
@ -1443,6 +1447,13 @@ void CNpcEnemy::processEvent( GAME_EVENT evt, CThing *sourceThing )
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case BOSS_FOUND_EVENT:
|
||||||
|
{
|
||||||
|
addHealthMeter();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,7 @@ protected:
|
||||||
virtual void processAnimFrames( int _frames );
|
virtual void processAnimFrames( int _frames );
|
||||||
virtual void processTimer( int _frames );
|
virtual void processTimer( int _frames );
|
||||||
bool isCollisionWithGround();
|
bool isCollisionWithGround();
|
||||||
|
virtual void addHealthMeter() {}
|
||||||
|
|
||||||
void processGenericGotoTarget( int _frames, s32 xDist, s32 yDist, s32 speed );
|
void processGenericGotoTarget( int _frames, s32 xDist, s32 yDist, s32 speed );
|
||||||
void processGenericGetUserDist( int _frames, s32 *distX, s32 *distY );
|
void processGenericGetUserDist( int _frames, s32 *distX, s32 *distY );
|
||||||
|
|
|
@ -56,7 +56,6 @@ void CNpcSubSharkEnemy::postInit()
|
||||||
m_extendDir = EXTEND_RIGHT;
|
m_extendDir = EXTEND_RIGHT;
|
||||||
m_npcPath.setPathType( CNpcPath::PONG_PATH );
|
m_npcPath.setPathType( CNpcPath::PONG_PATH );
|
||||||
m_salvoCount = 0;
|
m_salvoCount = 0;
|
||||||
m_meterOn=false;
|
|
||||||
|
|
||||||
if ( CLevel::getIsBossRespawn() )
|
if ( CLevel::getIsBossRespawn() )
|
||||||
{
|
{
|
||||||
|
@ -70,7 +69,7 @@ void CNpcSubSharkEnemy::postInit()
|
||||||
m_salvoCount = 5;
|
m_salvoCount = 5;
|
||||||
m_movementTimer = GameState::getOneSecondInFrames() * ( 1 + ( ( 7 * m_health ) / m_data[m_type].initHealth ) );
|
m_movementTimer = GameState::getOneSecondInFrames() * ( 1 + ( ( 7 * m_health ) / m_data[m_type].initHealth ) );
|
||||||
|
|
||||||
m_energyBar = NULL;
|
CNpcBossEnemy::postInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -663,12 +662,7 @@ void CNpcSubSharkEnemy::shutdown()
|
||||||
CLevel::setBossHealth( m_health );
|
CLevel::setBossHealth( m_health );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_energyBar )
|
CNpcBossEnemy::shutdown();
|
||||||
{
|
|
||||||
m_energyBar->setToShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
CNpcEnemy::shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -683,13 +677,6 @@ void CNpcSubSharkEnemy::render()
|
||||||
|
|
||||||
if (canRender())
|
if (canRender())
|
||||||
{
|
{
|
||||||
if (!m_meterOn)
|
|
||||||
{
|
|
||||||
m_energyBar=(CFXNRGBar*)CFX::Create(CFX::FX_TYPE_NRG_BAR,this);
|
|
||||||
m_energyBar->SetMax(m_data[m_type].initHealth);
|
|
||||||
m_meterOn=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
DVECTOR &renderPos=getRenderPos();
|
DVECTOR &renderPos=getRenderPos();
|
||||||
|
|
||||||
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
||||||
|
|
|
@ -14,11 +14,12 @@
|
||||||
#ifndef __ENEMY_NSSHARK_H__
|
#ifndef __ENEMY_NSSHARK_H__
|
||||||
#define __ENEMY_NSSHARK_H__
|
#define __ENEMY_NSSHARK_H__
|
||||||
|
|
||||||
#include "fx\fx.h"
|
#ifndef __ENEMY_NBOSS_H__
|
||||||
#include "fx\fxnrgbar.h"
|
#include "enemy\nboss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class CNpcSubSharkEnemy : public CNpcEnemy
|
class CNpcSubSharkEnemy : public CNpcBossEnemy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void think( int _frames );
|
virtual void think( int _frames );
|
||||||
|
@ -50,10 +51,8 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
u8 m_salvoCount;
|
u8 m_salvoCount;
|
||||||
bool m_meterOn;
|
|
||||||
s32 m_invulnerableTimer;
|
s32 m_invulnerableTimer;
|
||||||
DVECTOR m_targetPos;
|
DVECTOR m_targetPos;
|
||||||
CFXNRGBar *m_energyBar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -162,11 +162,10 @@ void CNpcSeaSnakeEnemy::postInit()
|
||||||
|
|
||||||
m_movementTimer = 2 * GameState::getOneSecondInFrames();
|
m_movementTimer = 2 * GameState::getOneSecondInFrames();
|
||||||
m_collTimer = 0;
|
m_collTimer = 0;
|
||||||
m_meterOn=false;
|
|
||||||
m_turnDir = 0;
|
m_turnDir = 0;
|
||||||
m_waitTimer = 0;
|
m_waitTimer = 0;
|
||||||
|
|
||||||
m_energyBar = NULL;
|
CNpcBossEnemy::postInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -193,12 +192,7 @@ void CNpcSeaSnakeEnemy::shutdown()
|
||||||
m_segmentArray[segCount].shutdown();
|
m_segmentArray[segCount].shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_energyBar )
|
CNpcBossEnemy::shutdown();
|
||||||
{
|
|
||||||
m_energyBar->setToShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
CNpcEnemy::shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -821,13 +815,6 @@ void CNpcSeaSnakeEnemy::render()
|
||||||
|
|
||||||
if (canRender())
|
if (canRender())
|
||||||
{
|
{
|
||||||
if (!m_meterOn)
|
|
||||||
{
|
|
||||||
m_energyBar=(CFXNRGBar*)CFX::Create(CFX::FX_TYPE_NRG_BAR,this);
|
|
||||||
m_energyBar->SetMax( NPC_SEA_SNAKE_LENGTH + 1 );
|
|
||||||
m_meterOn=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
DVECTOR &renderPos=getRenderPos();
|
DVECTOR &renderPos=getRenderPos();
|
||||||
|
|
||||||
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),0);
|
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),0);
|
||||||
|
@ -1071,3 +1058,15 @@ void CNpcSeaSnakeEnemy::moveEntireSnake( DVECTOR newPos )
|
||||||
m_positionHistoryArray[histLength].pos = Pos;
|
m_positionHistoryArray[histLength].pos = Pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CNpcSeaSnakeEnemy::addHealthMeter()
|
||||||
|
{
|
||||||
|
if (!m_meterOn)
|
||||||
|
{
|
||||||
|
m_energyBar=(CFXNRGBar*)CFX::Create(CFX::FX_TYPE_NRG_BAR,this);
|
||||||
|
m_energyBar->SetMax( NPC_SEA_SNAKE_LENGTH + 1 );
|
||||||
|
m_meterOn=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
#ifndef __ENEMY_NSSNAKE_H__
|
#ifndef __ENEMY_NSSNAKE_H__
|
||||||
#define __ENEMY_NSSNAKE_H__
|
#define __ENEMY_NSSNAKE_H__
|
||||||
|
|
||||||
#include "fx\fx.h"
|
#ifndef __ENEMY_NBOSS_H__
|
||||||
#include "fx\fxnrgbar.h"
|
#include "enemy\nboss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class CNpcSeaSnakeSegment
|
class CNpcSeaSnakeSegment
|
||||||
|
@ -52,7 +53,7 @@ protected:
|
||||||
int m_collisionRadius;
|
int m_collisionRadius;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CNpcSeaSnakeEnemy : public CNpcEnemy
|
class CNpcSeaSnakeEnemy : public CNpcBossEnemy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
|
@ -70,6 +71,7 @@ protected:
|
||||||
u8 processPathMove( int _frames, s32 *moveX, s32 *moveY, s32 *moveVel, s32 *moveDist );
|
u8 processPathMove( int _frames, s32 *moveX, s32 *moveY, s32 *moveVel, s32 *moveDist );
|
||||||
u8 isSnakeStopped();
|
u8 isSnakeStopped();
|
||||||
void moveEntireSnake( DVECTOR newPos );
|
void moveEntireSnake( DVECTOR newPos );
|
||||||
|
virtual void addHealthMeter();
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -97,12 +99,10 @@ protected:
|
||||||
s32 m_collTimer;
|
s32 m_collTimer;
|
||||||
s32 m_snapTimer;
|
s32 m_snapTimer;
|
||||||
//s32 m_openTimer;
|
//s32 m_openTimer;
|
||||||
bool m_meterOn;
|
|
||||||
u8 m_turnDir;
|
u8 m_turnDir;
|
||||||
s16 m_circleHeading;
|
s16 m_circleHeading;
|
||||||
s16 m_origHeading;
|
s16 m_origHeading;
|
||||||
s32 m_waitTimer;
|
s32 m_waitTimer;
|
||||||
CFXNRGBar *m_energyBar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -8,6 +8,7 @@
|
||||||
enum GAME_EVENT
|
enum GAME_EVENT
|
||||||
{
|
{
|
||||||
PROJECTILE_RETURNED_TO_SOURCE_EVENT,
|
PROJECTILE_RETURNED_TO_SOURCE_EVENT,
|
||||||
|
BOSS_FOUND_EVENT,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -598,6 +598,7 @@ void CGameScene::think_boss_intro(int _frames)
|
||||||
{
|
{
|
||||||
m_gamestate=GAMESTATE_FADING_OUT_OF_BOSS_INTRO;
|
m_gamestate=GAMESTATE_FADING_OUT_OF_BOSS_INTRO;
|
||||||
CFader::setFadingOut();
|
CFader::setFadingOut();
|
||||||
|
sendEvent( BOSS_FOUND_EVENT, NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue