stamina_model.h

説明を見る。
00001 // -*-c++-*-
00002 
00008 /*
00009  *Copyright:
00010 
00011  Copyright (C) Hidehisa AKIYAMA
00012 
00013  This code is free software; you can redistribute it and/or
00014  modify it under the terms of the GNU Lesser General Public
00015  License as published by the Free Software Foundation; either
00016  version 2.1 of the License, or (at your option) any later version.
00017 
00018  This library is distributed in the hope that it will be useful,
00019  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021  Lesser General Public License for more details.
00022 
00023  You should have received a copy of the GNU Lesser General Public
00024  License along with this library; if not, write to the Free Software
00025  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 
00027  *EndCopyright:
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

librcscに対してThu May 1 15:41:21 2008に生成されました。  doxygen 1.5.0