This commit is contained in:
parent
eef4e8dc39
commit
b74a6a6746
2 changed files with 86 additions and 0 deletions
50
source/enemy/nboss.cpp
Normal file
50
source/enemy/nboss.cpp
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*=========================================================================
|
||||
|
||||
nboss.h
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __ENEMY_NBOSS_H__
|
||||
#include "enemy\nboss.h"
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcBossEnemy::postInit()
|
||||
{
|
||||
m_meterOn=false;
|
||||
m_energyBar = NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcBossEnemy::shutdown()
|
||||
{
|
||||
if ( m_energyBar )
|
||||
{
|
||||
m_energyBar->setToShutdown();
|
||||
}
|
||||
|
||||
CNpcEnemy::shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcBossEnemy::addHealthMeter()
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
36
source/enemy/nboss.h
Normal file
36
source/enemy/nboss.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*=========================================================================
|
||||
|
||||
nboss.h
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __ENEMY_NBOSS_H__
|
||||
#define __ENEMY_NBOSS_H__
|
||||
|
||||
#ifndef __ENEMY_NPC_H__
|
||||
#include "enemy\npc.h"
|
||||
#endif
|
||||
|
||||
#include "fx\fx.h"
|
||||
#include "fx\fxnrgbar.h"
|
||||
|
||||
class CNpcBossEnemy : public CNpcEnemy
|
||||
{
|
||||
public:
|
||||
virtual void postInit();
|
||||
virtual void shutdown();
|
||||
protected:
|
||||
virtual void addHealthMeter();
|
||||
|
||||
bool m_meterOn;
|
||||
CFXNRGBar *m_energyBar;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue