クラス rcsc::StaminaModel

stamina management class [詳細]

#include <stamina_model.h>

すべてのメンバ一覧

Public メソッド

 StaminaModel ()
 init members by built-in values
void init (const double &stamina_max, const double &effort_max)
 initialize internal variables with server parameters
const double & stamina () const
 get current stamina value
const double & recovery () const
 get current recovery value
const double & effort () const
 get current effort value
void update (const PlayerType &player_type, const double &dashpower)
 update stamina related variables
void updateAfterSense (const PlayerType &player_type, const double &sensed_stamina, const double &sensed_effort, const GameTime &current)
 update with sense_body message
void updateAfterFullstate (const double &stamina, const double &effort, const double &recovery)
 update with fullstate message


説明

stamina management class


関数

void rcsc::StaminaModel::init ( const double &  stamina_max,
const double &  effort_max 
)

initialize internal variables with server parameters

引数:
stamina_max maximal stamina parameter
effort_max maxmal effort parameter
initial recovery parameter is always DEFAULT_RECOVERY_MAX

const double& rcsc::StaminaModel::stamina (  )  const [inline]

get current stamina value

戻り値:
const reference to the current stamina value

const double& rcsc::StaminaModel::recovery (  )  const [inline]

get current recovery value

戻り値:
const reference to the current recovery value

const double& rcsc::StaminaModel::effort (  )  const [inline]

get current effort value

戻り値:
const reference to the current effort value

void rcsc::StaminaModel::update ( const PlayerType player_type,
const double &  dashpower 
)

update stamina related variables

引数:
player_type PlayerType parameter
dashpower previous dash command parameter
update without sense_body message. this means that this method try to update variables only with internal values and estimated previous action effect, but we can update the stamina information very safety.

void rcsc::StaminaModel::updateAfterSense ( const PlayerType player_type,
const double &  sensed_stamina,
const double &  sensed_effort,
const GameTime current 
)

update with sense_body message

引数:
player_type PlayerType parameter
sensed_stamina stamina value included in sense_body
sensed_effort effort value included in sense_body
current game time that sense_body was received

void rcsc::StaminaModel::updateAfterFullstate ( const double &  stamina,
const double &  effort,
const double &  recovery 
)

update with fullstate message

引数:
stamina stamina value included in fullstate
effort effort value included in fullstate
recovery recovery value included in fullstate


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:28 2008に生成されました。  doxygen 1.5.0