summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-20 07:07:23 +0000
committerJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-20 07:07:23 +0000
commit148b62c05337eaaaf3a1ead212b3792122812cee (patch)
treea56e3e20b635f7f4ab53b55887103ae711558297 /src/being.cpp
parentc322e6eac2373358c04e7bd70c8e0fc1bcfb37db (diff)
downloadMana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.gz
Mana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.bz2
Mana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.xz
Mana-148b62c05337eaaaf3a1ead212b3792122812cee.zip
Added monster killed xp notification effect.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 5d30614c..4c3c03f6 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -191,6 +191,18 @@ Being::takeDamage(int amount)
}
void
+Being::showXP(int amount)
+{
+ gcn::Font* font;
+ std::string xp = (amount ? toString(amount) : "") + " xp";
+
+ font = hitYellowFont;
+
+ // show xp number
+ particleEngine->addTextRiseFadeOutEffect(xp, font, mPx + 16, mPy - 16);
+}
+
+void
Being::handleAttack(Being *victim, int damage)
{
setAction(Being::ATTACK);