Sha256: 2ef7f8844a1938670f933432d6ba802a6fd60fd62c42a632302e7372690158f8
Contents?: true
Size: 335 Bytes
Versions: 12
Compression:
Stored size: 335 Bytes
Contents
# Use this if you need a closest targeting mechanism. # module Targeting module Closest extend Trait # Returns the closest target of all targets in the fire arc. # # TODO fire arc # def acquire *targets targets.sort_by { |target| (target.position - self.position).length }.first end end end
Version data entries
12 entries across 12 versions & 1 rubygems