|
|
|
@ -63,20 +63,22 @@ void FrogTongue::Update(float fElapsedTime){ |
|
|
|
|
} |
|
|
|
|
if(friendly){ |
|
|
|
|
for(Monster&m:MONSTER_LIST){ |
|
|
|
|
if(geom2d::overlaps(m.Hitbox(),tongueLine)){ |
|
|
|
|
if(hitList.find(&m)==hitList.end()&&geom2d::overlaps(m.Hitbox(),tongueLine)){ |
|
|
|
|
MonsterHit(m); |
|
|
|
|
hitList.insert(&m); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
bool FrogTongue::PlayerHit(Player*player){ |
|
|
|
|
player->Hurt(damage,OnUpperLevel(),0); |
|
|
|
|
deactivated=true; |
|
|
|
|
if(!deactivated){ |
|
|
|
|
player->Hurt(damage,OnUpperLevel(),0); |
|
|
|
|
deactivated=true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
bool FrogTongue::MonsterHit(Monster&monster){ |
|
|
|
|
monster.Hurt(damage,OnUpperLevel(),0); |
|
|
|
|
deactivated=true; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
void FrogTongue::Draw(){ |
|
|
|
|