FAStarBase.remove_collision
声明
public void remove_collision(int x, int y)
参数
参数名 | 描述 |
---|---|
x | 地图坐标x |
y | 地图坐标y |
作用
该接口用来移除障碍物
使用方式
map.gs
component pkg.astar.components.FAStarBase;
void create(array para)
{
this.init_map(para);
}
test.gs
array grids =
[
[0, 0, 0, 0, 1, 1, 0, 1, 0, 1],
[1, 0, 0, 0, 1, 1, 0, 1, 0, 1],
[1, 1, 0, 0, 1, 1, 0, 1, 0, 1],
[1, 1, 1, 0, 1, 1, 0, 1, 0, 1],
[0, 1, 0, 0, 1, 1, 0, 1, 0, 1],
[1, 0, 1, 0, 0, 0, 0, 1, 0, 1],
[0, 0, 0, 0, 1, 1, 0, 0, 0, 1],
[0, 0, 0, 0, 1, 1, 1, 1, 0, 1],
[0, 0, 0, 0, 1, 1, 0, 1, 0, 1],
[0, 0, 0, 0, 1, 1, 1, 0, 1, 1],
];
object m = new_object(map, this_domain(), grids);
m.remove_collision(1, 0);