public void Compute(int x, int y, int depth, int radius, FovType type) { if (radius < 1) { throw new ArgumentOutOfRangeException("Cannot compute fov with a radius less than 1."); } SetInFov(x, y, depth); if (type == FovType.Shadowcast) { ShadowCast(x, y, depth, radius); } else if (type == FovType.Linecast) { LineCast(x, y, depth, radius); } }
public void ComputeFov(int x, int y, int depth, int radius, FovType type) { _fov.ClearFov(); _fov.Compute(x, y, depth, radius, type); }