Projectile* LaserBullet::bullet() { Projectile* projectTile = Projectile::create(); projectTile->sprite = Sprite::create("bullet3.png"); projectTile->addChild(projectTile->sprite,0); projectTile->power = 3; return projectTile; }
Projectile* SlowBullet::bullet() { Projectile* projectTile = Projectile::create(); projectTile->sprite = Sprite::create("bullet4.png"); projectTile->addChild(projectTile->sprite,0); projectTile->power = 4; return projectTile; }
Projectile* MissileBullet::bullet() { Projectile* projectTile = Projectile::create(); projectTile->sprite = Sprite::create("bullet2.png"); projectTile->addChild(projectTile->sprite,0); projectTile->power = 2; return projectTile; }
Projectile* MachineGunBullet::bullet() { Projectile* projectTile = Projectile::create(); projectTile->sprite = Sprite::create("bullet1.png"); projectTile->addChild(projectTile->sprite,0); projectTile->power = 1; return projectTile; }
Projectile* MissleProjectile::projectile() { Projectile* projectile = Projectile::create(); projectile->projectileSprite = Sprite::create("Projectile.png"); projectile->addChild(projectile->projectileSprite); projectile->setScale(1.2); projectile->projectileDamage = 4; projectile->type = ProjectileType::MissleProjectile; return projectile; }
Projectile* FastMachineGunProjectile::projectile() { Projectile* projectile = Projectile::create(); projectile->projectileSprite = Sprite::create("Projectile.png"); projectile->addChild(projectile->projectileSprite); // projectile->setScale(0.6); projectile->projectileDamage = 0.8; projectile->type = ProjectileType::FastMachineGunProjectile; return projectile; }
Projectile* MachineGunProjectile::projectile() { Projectile* projectile = Projectile::create(); projectile->projectileSprite = Sprite::create("Projectile.png"); if (projectile != NULL) { projectile->addChild(projectile->projectileSprite); // projectile->setScale(0.5); projectile->projectileDamage = 1.2; projectile->type = ProjectileType::MachineGunProjectile; return projectile; } else { return NULL; } }