game_in_work_example
This commit is contained in:
@@ -30,6 +30,7 @@ bool Towers::addTower(int playerId, int srcId, QPoint pos)
|
||||
tw.build = 0;
|
||||
tw.reload = 0;
|
||||
tw.aim = -1;
|
||||
tw.experience = 0;
|
||||
//tw .oldAim = -1;
|
||||
if (gameData->map->addTowerOnMap(playerId,pos))
|
||||
{
|
||||
@@ -96,6 +97,7 @@ void Towers::update()
|
||||
if ((*i).aim > 0)
|
||||
{
|
||||
(*i).reload = 0;
|
||||
(*i).experience += stw.expByShot;
|
||||
emit shot((*i).pos);
|
||||
//qDebug("shot!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user