00001 #include "BigHandPowerup.h"
00002
00003 #include "Player.h"
00004 #include "libwiigui/gui.h"
00005
00006 extern Player *g_players;
00007
00008 PowerupId BigHandPowerup::powerupId;
00009 Powerup *BigHandPowerup::instance = new BigHandPowerup();
00010
00011 GuiImageData *BigHandPowerup::imageData =
00012 new GuiImageData(powerup_bighand_png);
00013
00014 string BigHandPowerup::helpText[2] =
00015 {"Big Hand", "Hey! Your hand's in the way!"};
00016
00017 void BigHandPowerup::StartEffect(u8 player)
00018 {
00019 g_players[player].gameData.powerupData.isBigHand = true;
00020 }
00021
00022
00023
00024
00025
00026
00027
00028 void BigHandPowerup::StopEffect(u8 player)
00029 {
00030 for (int i = 0; i < MAX_POWERUP_EFFECTS; ++i)
00031 {
00032 Powerup *powerup = g_players[player].gameData.powerupEffects[i];
00033 if (powerup && powerup->GetPowerupId() == powerupId)
00034 {
00035 return;
00036 }
00037 }
00038
00039 g_players[player].gameData.powerupData.isBigHand = false;
00040 }