public SamplingGrid(int sqrtNumArea) { grid = new AreaGrid[sqrtNumArea][]; for (int i = 0; i < sqrtNumArea; i++) { grid[i] = new AreaGrid[sqrtNumArea]; } }
/// <summary> /// 初期化 /// </summary> public void Initialize(Transform enemyRoot) { // マス目取得 grids = new List <AreaGrid>(GetComponentsInChildren <AreaGrid>()); leadGrid = grids[0]; endGrid = grids[grids.Count - 1]; for (int i = 0; i < gridCount; ++i) { grids[i].Initialize(enemyRoot); } }
public virtual void initGrid(int ax, int ay, int width, int height) { grid[ax][ay] = new AreaGrid(this, width, height); }