This commit is contained in:
parent
49d44deb74
commit
08027943d1
@ -115,6 +115,13 @@ void CNpcSkullStomperEnemy::processClose( int _frames )
|
|||||||
{
|
{
|
||||||
// colliding with ground
|
// colliding with ground
|
||||||
|
|
||||||
|
if( m_soundId != NOT_PLAYING )
|
||||||
|
{
|
||||||
|
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__FALLING_ROCK_LAND, true );
|
||||||
|
|
||||||
Pos.vy += groundHeight;
|
Pos.vy += groundHeight;
|
||||||
|
|
||||||
// pause and change direction
|
// pause and change direction
|
||||||
|
@ -91,6 +91,11 @@ void CNpcCollapsingBubblePlatform::processLifetime( int _frames )
|
|||||||
{
|
{
|
||||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||||
m_pop = true;
|
m_pop = true;
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( m_lifetime <= ( GameState::getOneSecondInFrames() >> 1 ) )
|
else if ( m_lifetime <= ( GameState::getOneSecondInFrames() >> 1 ) )
|
||||||
{
|
{
|
||||||
|
@ -59,6 +59,11 @@ void CNpcGeyserBubblePlatform::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||||
m_pop = true;
|
m_pop = true;
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -67,6 +72,11 @@ void CNpcGeyserBubblePlatform::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||||
m_pop = true;
|
m_pop = true;
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,11 @@ void CNpcPlayerBubblePlatform::processLifetime( int _frames )
|
|||||||
{
|
{
|
||||||
m_pop = true;
|
m_pop = true;
|
||||||
|
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||||
|
}
|
||||||
|
|
||||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||||
}
|
}
|
||||||
else if ( m_lifetime <= ( GameState::getOneSecondInFrames() >> 1 ) )
|
else if ( m_lifetime <= ( GameState::getOneSecondInFrames() >> 1 ) )
|
||||||
|
@ -379,6 +379,8 @@ void CPlayerModeJellyLauncher::launchProjectile()
|
|||||||
int fireHeading;
|
int fireHeading;
|
||||||
CPlayerProjectile *projectile;
|
CPlayerProjectile *projectile;
|
||||||
|
|
||||||
|
CSoundMediator::playSfx(CSoundMediator::SFX_JELLY_LAUNCHER);
|
||||||
|
|
||||||
playerFacing=m_player->getFacing();
|
playerFacing=m_player->getFacing();
|
||||||
launchPos=getPlayerPos();
|
launchPos=getPlayerPos();
|
||||||
launchPos.vx+=playerFacing*jellyLaunchPos.vx;
|
launchPos.vx+=playerFacing*jellyLaunchPos.vx;
|
||||||
|
@ -22,6 +22,39 @@
|
|||||||
#include "fx\fxsteam.h"
|
#include "fx\fxsteam.h"
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CSteamEmitterTrigger::init()
|
||||||
|
{
|
||||||
|
CTrigger::init();
|
||||||
|
|
||||||
|
m_soundId = (int) NOT_PLAYING;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CSteamEmitterTrigger::think(int _frames)
|
||||||
|
{
|
||||||
|
if ( m_soundId == NOT_PLAYING )
|
||||||
|
{
|
||||||
|
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STEAM, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
CTrigger::think( _frames );
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CSteamEmitterTrigger::shutdown()
|
||||||
|
{
|
||||||
|
if ( m_soundId != NOT_PLAYING )
|
||||||
|
{
|
||||||
|
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||||
|
}
|
||||||
|
|
||||||
|
CTrigger::shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CSteamEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
void CSteamEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
||||||
|
@ -43,9 +43,13 @@
|
|||||||
class CSteamEmitterTrigger : public CTrigger
|
class CSteamEmitterTrigger : public CTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
void init();
|
||||||
|
void think(int _frames);
|
||||||
|
void shutdown();
|
||||||
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
|
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
|
||||||
protected:
|
protected:
|
||||||
CFX *m_effect;
|
CFX *m_effect;
|
||||||
|
int m_soundId;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user