diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-03-21 13:12:22 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-03-21 13:12:22 -0500 |
commit | 0dc4aae6128eb16acef1b6faeabcb546762ebe36 (patch) | |
tree | 6754bbf4c92ffc315d4978b95519492484c62963 /src/bossCaptainBowser.cpp | |
parent | 800f3920d31c2562cc2f0af112c9efa5d5343d6e (diff) | |
download | kamek-0dc4aae6128eb16acef1b6faeabcb546762ebe36.tar.gz kamek-0dc4aae6128eb16acef1b6faeabcb546762ebe36.zip |
more fixes
Diffstat (limited to 'src/bossCaptainBowser.cpp')
-rw-r--r-- | src/bossCaptainBowser.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/bossCaptainBowser.cpp b/src/bossCaptainBowser.cpp index 6152b42..729c1cf 100644 --- a/src/bossCaptainBowser.cpp +++ b/src/bossCaptainBowser.cpp @@ -29,13 +29,6 @@ const char* effects_name_list [] = { -void ShipPhysicsCallback(daBoss *self, dStageActor_c *other) { - if (other->name == EN_CANNON_BULLET) { - - } -} - - class daCaptainBowser : public daBoss { public: int onCreate(); @@ -92,6 +85,21 @@ daCaptainBowser *daCaptainBowser::build() { return new(buffer) daCaptainBowser; } +void ShipPhysicsCallback(daCaptainBowser *self, dStageActor_c *other) { + if (other->name == EN_CANNON_BULLET) { + OSReport("CANNON COLLISION"); + if (self->isInvulnerable) { + return; + } + self->damage += 1; + + if (self->damage == 10) { self->doStateChange(&daCaptainBowser::StateID_Roar); } + else if (self->damage > 20) { self->doStateChange(&daCaptainBowser::StateID_Outro); } + else { self->doStateChange(&daCaptainBowser::StateID_Damage); } + + } +} + /////////////////////// // Externs and States /////////////////////// |