#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 ¤t) |
update with sense_body message | |
void | updateAfterFullstate (const double &stamina, const double &effort, const double &recovery) |
update with fullstate message |
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 |
const double& rcsc::StaminaModel::stamina | ( | ) | const [inline] |
get current stamina value
const double& rcsc::StaminaModel::recovery | ( | ) | const [inline] |
get current recovery value
const double& rcsc::StaminaModel::effort | ( | ) | const [inline] |
get 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 |
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 |