This commit is contained in:
Paul 2001-02-06 20:25:27 +00:00
parent e0d7168d5c
commit 854dd569d8
2 changed files with 142 additions and 0 deletions

82
source/player/psdead.cpp Normal file
View File

@ -0,0 +1,82 @@
/*=========================================================================
psdead.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\psdead.h"
#ifndef __PLAYER_PLAYER_H__
#include "player\player.h"
#endif
/* Std Lib
------- */
/* Data
---- */
#ifndef __ANIM_PLAYER_ANIM_HEADER__
#include <player_anim.h>
#endif
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayerStateDead::enter(CPlayer *_player)
{
setAnimNo(_player,ANIM_PLAYER_ANIM_DEATHSPIN);
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayerStateDead::think(CPlayer *_player)
{
if(advanceAnimFrameAndCheckForEndOfAnim(_player))
{
setState(_player,STATE_IDLE);
}
}
/*===========================================================================
end */

60
source/player/psdead.h Normal file
View File

@ -0,0 +1,60 @@
/*=========================================================================
psdead.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PLAYER_PSDEAD_H__
#define __PLAYER_PSDEAD_H__
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\pstates.h"
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CPlayerStateDead : public CPlayerState
{
public:
virtual void enter(class CPlayer *_player);
virtual void think(class CPlayer *_player);
};
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __PLAYER_PSDEAD_H__ */
/*===========================================================================
end */