SBSPSS/source/platform/pfishhk.cpp

49 lines
1.1 KiB
C++
Raw Normal View History

2001-04-23 20:18:19 +02:00
/*=========================================================================
pfishhk.cpp
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PLATFORM_PFISHHK_H__
#include "platform\pfishhk.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2001-04-25 22:04:25 +02:00
void CNpcFishHookPlatform::postInit()
{
m_isMoving = false;
m_isShuttingDown = false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2001-04-23 20:18:19 +02:00
void CNpcFishHookPlatform::processLifetime( int _frames )
{
if ( m_contact )
{
m_isMoving = true;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcFishHookPlatform::processMovement( int _frames )
{
2001-04-23 22:40:13 +02:00
if ( m_isMoving )
2001-04-23 20:18:19 +02:00
{
2001-04-23 22:40:13 +02:00
Pos.vy -= m_data[m_type].speed * _frames;
if ( Pos.vy < 0 )
{
2001-04-25 22:09:36 +02:00
setToShutdown();
2001-04-23 22:40:13 +02:00
}
2001-04-23 20:18:19 +02:00
}
}