Path Modifier in Tower Of Defense Game

Posted by Siddharth on Game Development See other posts from Game Development or by Siddharth
Published on 2012-12-04T15:43:40Z Indexed on 2012/12/04 17:21 UTC
Read the original article Hit count: 209

Filed under:

I implemented PathModifier for path of each enemy in my tower of defense game. So I applied fixed time to path modifier in that enemy complete their path. Like following code describe.

new PathModifier(speed, path);

Here speed define the time to complete the path. But in tower of defense game my problem is, there is a tower which slow down the movement of the enemy. In that particular situation I was stuck. please someone provide me some guidance what to do in this situation.

EDIT :

        Path path = new Path(wayPointList.size());
        for (int j = 0; j < wayPointList.size(); j++) {
            Point point = grid.getCellPoint(wayPointList.get(j).getRow(),
                    wayPointList.get(j).getCol());
            path.to(point.x, point.y);
        }

© Game Development or respective owner

Related posts about andengine