Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #pragma once
00031 #ifndef __POWERUPLINEPIECE_H__
00032 #define __POWERUPLINEPIECE_H__
00033
00034 #include "Powerup.h"
00035
00036
00037 class PowerupLinePiece : public Powerup
00038 {
00039 public:
00040 virtual PowerupId GetPowerupId() { return powerupId; }
00041 virtual GuiImageData* GetImageData() { return imageData; }
00042 virtual string* GetHelpText() { return helpText; }
00043
00044 protected:
00045 PowerupLinePiece()
00046 {
00047 STATIC
00048 (
00049 vector<Powerup *> &powerupVector = Powerup::GetVector();
00050 powerupId = powerupVector.size();
00051 powerupVector.push_back(this);
00052 )
00053 }
00054 virtual ~PowerupLinePiece() { }
00055
00056
00057 virtual Powerup* GetInstance() { return new PowerupLinePiece(); }
00058
00059 virtual void StartEffect(u8 player);
00060 virtual void StopEffect(u8 player);
00061 virtual u32 GetDuration() { return 1000; }
00062
00063 private:
00064 static PowerupId powerupId;
00065 static Powerup *instance;
00066 static GuiImageData *imageData;
00067 static string helpText[2];
00068 };
00069
00070 #endif // __POWERUPLINEPIECE_H__