cPlayer definicia triedy:
Kód: Vybrať všetko
enum { PLAYER_BULLETS = 100};
cBullet Bullets[PLAYER_BULLETS];
...Kód: Vybrať všetko
cPlayer::cPlayer(float mx, float my)
{
x = mx;
y = my;
angle = 0;
health = 100;
bulletType = 1;
_frequency = 0;
Bullets[] = cBullet('p');
sizeX = imgPlayer.GetWidth();
sizeY = imgPlayer.GetHeight();
}Kód: Vybrať všetko
cBullet::cBullet(char _type)
{
x = 0;
y = 0;
active = false;
type = _type;
}