public PointsCointerner(PointsCointerner other) { Dictionary<int,Sector> clone = new Dictionary<int, Sector>(); for(int i = 1; i <= other.points.Count; i++){ clone.Add(i,other.points[i].clone()); } points = clone; }
public PointsCointerner(PointsCointerner other) { Dictionary <int, Sector> clone = new Dictionary <int, Sector>(); for (int i = 1; i <= other.points.Count; i++) { clone.Add(i, other.points[i].clone()); } points = clone; }
public Food(HerdParameters herdParameters, Transform visualFoodTransform) { sectorManager = GameObject.FindGameObjectWithTag("Sector").GetComponent<SectorsManager>(); pointsCointainer = sectorManager.getContainerClone(); List<Vector3> initialTrace = pointsCointainer.getAllMapPoints(); positions = new Position[initialTrace.Count]; visualFoodPosition = visualFoodTransform; this.herdParameters = herdParameters; for(int i = 0; i < initialTrace.Count; i++){ positions[i] = new Position(initialTrace[i]); } initCenterPositions(); }
public Food(HerdParameters herdParameters, Transform visualFoodTransform) { sectorManager = GameObject.FindGameObjectWithTag("Sector").GetComponent <SectorsManager>(); pointsCointainer = sectorManager.getContainerClone(); List <Vector3> initialTrace = pointsCointainer.getAllMapPoints(); positions = new Position[initialTrace.Count]; visualFoodPosition = visualFoodTransform; this.herdParameters = herdParameters; for (int i = 0; i < initialTrace.Count; i++) { positions[i] = new Position(initialTrace[i]); } initCenterPositions(); }