/// <summary> /// Clear all scent buffers. /// </summary> public override void Clear() { path.Clear(); buffer1 = new ScentBuffer(gridSize); buffer2 = new ScentBuffer(gridSize); isLive = true; }
public ScentMap(int gridSize, Map map) { name = "Scent Map"; this.gridSize = gridSize; buffer1 = new ScentBuffer(gridSize); buffer2 = new ScentBuffer(gridSize); sourceValue = 0; this.map = map; }
/// <summary> /// Creates a new scent map. /// </summary> /// <param name="gridSize">The size of the grid being used by this scent map.</param> /// <param name="map">The map object being used by this scent map.</param> public ScentMap(int gridSize, Map map) { name = "Scent Map"; this.gridSize = gridSize; buffer1 = new ScentBuffer(gridSize); buffer2 = new ScentBuffer(gridSize); sourceValue = 1; this.map = map; path = new List <Coord2>(); isLive = true; scentColor = Color.Red; }
/// <summary> /// Creates a new scent map. /// </summary> /// <param name="gridSize">The size of the grid being used by this scent map.</param> /// <param name="map">The map object being used by this scent map.</param> public ScentMap(int gridSize, Map map) { name = "Scent Map"; this.gridSize = gridSize; buffer1 = new ScentBuffer(gridSize); buffer2 = new ScentBuffer(gridSize); sourceValue = 1; this.map = map; path = new List<Coord2>(); isLive = true; scentColor = Color.Red; }
/// <summary> /// Copy the given scent buffer into this one. /// </summary> public void Copy(ScentBuffer param) { this.gridSize = param.gridSize; data = new int[gridSize, gridSize]; for (int x = 0; x < gridSize; x++) { for (int y = 0; y < gridSize; y++) { data[x, y] = param.data[x, y]; } } }
/// <summary> /// Copy the given scent buffer into this one. /// </summary> public void Copy(ScentBuffer param) { this.gridSize = param.gridSize; data = new int[gridSize, gridSize]; for (int x = 0; x < gridSize; x++) for (int y = 0; y < gridSize; y++) data[x, y] = param.data[x,y]; }