All Downloads are FREE. Search and download functionalities are using the official Maven repository.

squidpony.squidai.Threat Maven / Gradle / Ivy

Go to download

SquidLib platform-independent logic and utility code. Please refer to https://github.com/SquidPony/SquidLib .

There is a newer version: 3.0.6
Show newest version
package squidpony.squidai;

import squidpony.squidgrid.Radius;
import squidpony.squidmath.Coord;

import java.io.Serializable;

/**
 * A small class to store the area that a creature is perceived by other creatures to threaten.
 * Created by Tommy Ettinger on 11/8/2015.
 */
public class Threat implements Serializable {
    private static final long serialVersionUID = 1L;
    public Coord position;
    public Reach reach;

    public Threat(Coord position, int maxThreatDistance) {
        this.position = position;
        reach = new Reach(maxThreatDistance);
    }

    public Threat(Coord position, int minThreatDistance, int maxThreatDistance) {
        this.position = position;
        reach = new Reach(minThreatDistance, maxThreatDistance);
    }
    public Threat(Coord position, int minThreatDistance, int maxThreatDistance, Radius measurement) {
        this.position = position;
        reach = new Reach(minThreatDistance, maxThreatDistance, measurement);
    }
    public Threat(Coord position, int minThreatDistance, int maxThreatDistance, Radius measurement, AimLimit limits) {
        this.position = position;
        reach = new Reach(minThreatDistance, maxThreatDistance, measurement, limits);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy