This commit is contained in:
parent
5b7b5b9628
commit
700c91949e
2 changed files with 70 additions and 0 deletions
38
source/platform/pfishhk.cpp
Normal file
38
source/platform/pfishhk.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*=========================================================================
|
||||
|
||||
pfishhk.cpp
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __PLATFORM_PFISHHK_H__
|
||||
#include "platform\pfishhk.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFishHookPlatform::processLifetime( int _frames )
|
||||
{
|
||||
if ( m_contact )
|
||||
{
|
||||
m_isMoving = true;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFishHookPlatform::processMovement( int _frames )
|
||||
{
|
||||
Pos.vy -= m_data[m_type].speed * _frames;
|
||||
|
||||
if ( Pos.vy < 0 )
|
||||
{
|
||||
shutdown();
|
||||
}
|
||||
}
|
32
source/platform/pfishhk.h
Normal file
32
source/platform/pfishhk.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*=========================================================================
|
||||
|
||||
pfishhk.h
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __PLATFORM_PFISHHK_H__
|
||||
#define __PLATFORM_PFISHHK_H__
|
||||
|
||||
#ifndef __PLATFORM_PLATFORM_H__
|
||||
#include "platform\platform.h"
|
||||
#endif
|
||||
|
||||
class CNpcFishHookPlatform : public CNpcPlatform
|
||||
{
|
||||
public:
|
||||
virtual void postInit() {m_isMoving = false;}
|
||||
protected:
|
||||
virtual void processLifetime( int _frames );
|
||||
virtual void processMovement( int _frames );
|
||||
|
||||
bool m_isMoving;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue