Пример #1
0
bool CEnemy::update(float time_elapsed_ms,CNode * nodes)
{
	if(!isDead())
	{
		//update position
		updatePos(time_elapsed_ms);
		//if at each waypoint
		if(DistanceCheck())
		{
			setCurrNode(&nodes[getNodeIndex()+1]);
			setNodeIndex(getNodeIndex()+1);
			//special check for end waypoint
			//if at the end waypoint
			if(getNodeIndex() == ENDNODE)
			{
				if(!isDead())
				{
					setDead(true);
				}
				return true;
				//life minuses here
				//reset mob
				//change to wavemanager later
			//	enemyArray[i].spawn(currType,currLevel);
			//	enemyArray[i].setNodeIndex(0);
			//	enemyArray[i].setPos(NodeArray[0].getPos());
			}
		}
	}
	return false;
}
Пример #2
0
        void FilterTargets(std::list<WorldObject*>& targets)
        {
            if (!GetCaster())
                return;

            if (!targets.empty())
                targets.remove_if(DistanceCheck(GetCaster()));
        }
Пример #3
0
 void FilterTargetsInitial(std::list<Unit*>& unitList)
 {
     unitList.remove_if(DistanceCheck(GetCaster()));
     sharedUnitList = unitList;
 }
Пример #4
0
 void FilterTargetsInitial(std::list<WorldObject*>& targets)
 {
     targets.remove_if(DistanceCheck(GetCaster()));
     sharedTargets = targets;
 }
Пример #5
0
 void FilterTargets(std::list<WorldObject*>& unitList)
 {
     unitList.remove_if(DistanceCheck(x, y));
 }