Sha256: fbf1014271cfa0fd4fe3d01268a07996dc7d3477382f9e567e0d5f464129ac30

Contents?: true

Size: 253 Bytes

Versions: 10

Compression:

Stored size: 253 Bytes

Contents

# An Attachable can be attached to a Pod.
#
module Attachable extend Trait
  
  attr_accessor :relative_position
  
  def move_relative pod
    self.position = pod.position + relative_position # pod.rotation
    self.rotation = pod.rotation
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gosu_extensions-0.1.24 lib/traits/attachable.rb
gosu_extensions-0.1.23 lib/traits/attachable.rb
gosu_extensions-0.1.22 lib/traits/attachable.rb
gosu_extensions-0.1.21 lib/traits/attachable.rb
gosu_extensions-0.1.20 lib/traits/attachable.rb
gosu_extensions-0.1.19 lib/traits/attachable.rb
gosu_extensions-0.1.18 lib/traits/attachable.rb
gosu_extensions-0.1.17 lib/traits/attachable.rb
gosu_extensions-0.1.16 lib/traits/attachable.rb
gosu_extensions-0.1.15 lib/traits/attachable.rb