int main ()
{
    TowerArray *tArray = initTowerArray();

    /*Tower* initTower(int ttype, int x, int y, int damage, int range, int rtime, int lastShot);*/

    Tower* tower1 = initTower(basicLine,20,30,3,3,3,1); //cant shoot
    Tower* tower2 = initTower(AOE,25,35,4,4,4,4); // can shoot
    Tower* tower3 = initTower(bomb,30,40,5,5,5,2); // can shoot
    Tower* tower4 = initTower(collat,35,45,6,6,6,7); //cant shoot

    tArray->towers[0] = *tower1;
    tArray->towers[1] = *tower2;
    tArray->towers[2] = *tower3;
    tArray->towers[3] = *tower4;
    tArray->size = 4;


    checkReload(tArray);
    updateReload(tArray);

    return 0;
}
Пример #2
0
bool SimpleMageTowerlvl2::init()
{
	if (!Sprite::init())
	{
		return false;
	}
	setTowerType(MAGE_2);
	setLevel(2);
	addTerrain();
	initTower(2);
	setListener();
	setScope(180.0f);
	setUpdateMoney(240);
	setBuildMoney(260);
	isUpdateMenuShown = false;
	schedule(schedule_selector(SimpleMageTowerlvl2::shoot), 2.0f);
	SoundManager::playMageTower2Ready();
	return true;
}
Пример #3
0
bool ArchMageTower::init()
{
	if (!Sprite::init())
	{
		return false;
	}
	setTowerType(ARCHMAGE);
	DelayBullet[0] = NULL;
	DelayBullet[1] = NULL;
	DelayBullet[2] = NULL;
	setLevel(4);
	addTerrain();
	initTower(4);
	setListener();
	setScope(220.0f);
	setBuildMoney(730);
	isUpdateMenuShown = false;
	SoundManager::playArchmageReady();
	schedule(schedule_selector(ArchMageTower::Attack), 2.0f);
	schedule(schedule_selector(ArchMageTower::AtTwister), 7.0f);
	return true;
}