From 0dc4aae6128eb16acef1b6faeabcb546762ebe36 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Wed, 21 Mar 2012 13:12:22 -0500 Subject: more fixes --- src/bossCaptainBowser.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/bossCaptainBowser.cpp') 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 /////////////////////// -- cgit v1.2.3