Sha256: f226bf2482db6b0c124f59d156eafbf22b80bfff979d76fb16b3be65abf79e8b

Contents?: true

Size: 187 Bytes

Versions: 15

Compression:

Stored size: 187 Bytes

Contents

# Any object that is targetable.
#
module Targetable
  
  # Distance from the potential shooter.
  #
  def distance_from shooter
    (self.position - shooter.position).length
  end
  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gosu_extensions-0.1.14 lib/traits/targetable.rb
gosu_extensions-0.1.13 lib/traits/targetable.rb
gosu_extensions-0.1.12 lib/traits/targetable.rb
gosu_extensions-0.1.11 lib/traits/targetable.rb
gosu_extensions-0.1.10 lib/traits/targetable.rb
gosu_extensions-0.1.9 lib/traits/targetable.rb
gosu_extensions-0.1.8 lib/traits/targetable.rb
gosu_extensions-0.1.7 lib/traits/targetable.rb
gosu_extensions-0.1.6 lib/traits/targetable.rb
gosu_extensions-0.1.5 lib/traits/targetable.rb
gosu_extensions-0.1.4 lib/traits/targetable.rb
gosu_extensions-0.1.3 lib/traits/targetable.rb
gosu_extensions-0.1.2 lib/traits/targetable.rb
gosu_extensions-0.1.1 lib/traits/targetable.rb
gosu_extensions-0.1.0 lib/traits/targetable.rb