00001
00002
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00031
00032 #ifndef RCSC_PLAYER_STAMINA_MODEL_H
00033 #define RCSC_PLAYER_STAMINA_MODEL_H
00034
00035 namespace rcsc {
00036
00037 class PlayerType;
00038 class GameTime;
00039
00044 class StaminaModel {
00045 private:
00047 static const double DEFAULT_RECOVERY_MAX;
00048
00050 double M_stamina;
00052 double M_recovery;
00054 double M_effort;
00055 public:
00059 StaminaModel();
00060
00068 void init( const double & stamina_max,
00069 const double & effort_max );
00070
00075 const
00076 double & stamina() const
00077 {
00078 return M_stamina;
00079 }
00080
00085 const
00086 double & recovery() const
00087 {
00088 return M_recovery;
00089 }
00090
00095 const
00096 double & effort() const
00097 {
00098 return M_effort;
00099 }
00100
00111 void update( const PlayerType & player_type,
00112 const double & dashpower );
00113
00121 void updateAfterSense( const PlayerType & player_type,
00122 const double & sensed_stamina,
00123 const double & sensed_effort,
00124 const GameTime & current );
00125
00132 void updateAfterFullstate( const double & stamina,
00133 const double & effort,
00134 const double & recovery );
00135
00136 };
00137
00138 }
00139
00140 #endif