001package squidpony.squidai; 002 003import squidpony.squidgrid.Radius; 004import squidpony.squidmath.Coord; 005 006import java.io.Serializable; 007 008/** 009 * A small class to store the area that a creature is perceived by other creatures to threaten. 010 * Created by Tommy Ettinger on 11/8/2015. 011 */ 012public class Threat implements Serializable { 013 private static final long serialVersionUID = 1L; 014 public Coord position; 015 public Reach reach; 016 017 public Threat(Coord position, int maxThreatDistance) { 018 this.position = position; 019 reach = new Reach(maxThreatDistance); 020 } 021 022 public Threat(Coord position, int minThreatDistance, int maxThreatDistance) { 023 this.position = position; 024 reach = new Reach(minThreatDistance, maxThreatDistance); 025 } 026 public Threat(Coord position, int minThreatDistance, int maxThreatDistance, Radius measurement) { 027 this.position = position; 028 reach = new Reach(minThreatDistance, maxThreatDistance, measurement); 029 } 030 public Threat(Coord position, int minThreatDistance, int maxThreatDistance, Radius measurement, AimLimit limits) { 031 this.position = position; 032 reach = new Reach(minThreatDistance, maxThreatDistance, measurement, limits); 033 } 034}