summaryrefslogtreecommitdiff
path: root/src/bossCaptainBowser.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-03-21 13:12:22 -0500
committerColin Noga <Tempus@chronometry.ca>2012-03-21 13:12:22 -0500
commit0dc4aae6128eb16acef1b6faeabcb546762ebe36 (patch)
tree6754bbf4c92ffc315d4978b95519492484c62963 /src/bossCaptainBowser.cpp
parent800f3920d31c2562cc2f0af112c9efa5d5343d6e (diff)
downloadkamek-0dc4aae6128eb16acef1b6faeabcb546762ebe36.tar.gz
kamek-0dc4aae6128eb16acef1b6faeabcb546762ebe36.zip
more fixes
Diffstat (limited to '')
-rw-r--r--src/bossCaptainBowser.cpp22
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
///////////////////////