OSDN Git Service

Implement properties to HaveHp class.
authorDeskull <desull@users.sourceforge.jp>
Mon, 16 Jun 2014 11:48:09 +0000 (20:48 +0900)
committerDeskull <desull@users.sourceforge.jp>
Mon, 16 Jun 2014 11:48:09 +0000 (20:48 +0900)
Deeangband/HaveHp.cpp
Deeangband/HaveHp.h

index 183227e..91ba803 100644 (file)
@@ -21,4 +21,19 @@ namespace Deeangband
                return;
        }
 
+       HP HaveHp::GetCurHP(void)
+       {
+               return this->currentHp;
+       }
+
+       HP HaveHp::GetMaxHP(void)
+       {
+               return this->maxHp;
+       }
+
+       HP HaveHp::GetNorMaxHP(void)
+       {
+               return this->maxMaxHp;
+       }
+
 }
index fbef749..b8165bb 100644 (file)
@@ -38,6 +38,11 @@ namespace Deeangband
                        }
                }
 
+       protected:
+               HP currentHp;     //!< \8c»\8dÝ\82ÌHP
+               HP maxHp;         //!< \8c»\8dÝ\82Ì\8dÅ\91åHP
+               HP maxMaxHp;      //!< \95½\8fí\82Ì\8dÅ\91åHP
+
        public:
 
                /*! 
@@ -50,6 +55,24 @@ namespace Deeangband
                */
                HaveHp::~HaveHp(void);
 
+               /*!
+               * @brief \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»HP\82ð\95Ô\82·
+               * @return \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»HP
+               */
+               HP HaveHp::GetCurHP(void);
+
+               /*!
+               * @brief \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»\8dÅ\91åHP\82ð\95Ô\82·
+               * @return \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»\8dÅ\91åHP
+               */
+               HP HaveHp::GetMaxHP(void);
+
+               /*!
+               * @brief \83N\83\8a\81[\83`\83\83\81[\82Ì\92Ê\8fí\8dÅ\91åHP\82ð\95Ô\82·
+               * @return \83N\83\8a\81[\83`\83\83\81[\82Ì\92Ê\8fí\8dÅ\91åHP
+               */
+               HP HaveHp::GetNorMaxHP(void);
+
        };
 }