lib/units/thing.rb in gosu_extensions-0.3.6 vs lib/units/thing.rb in gosu_extensions-0.3.7

- old
+ new

@@ -18,10 +18,11 @@ def layer Layer::Players end class << self + @@form_shape_class_mapping = { :circle => CP::Shape::Circle, # :circle, radius :poly => CP::Shape::Poly, # :poly, CP::Vec2.new(-22, -18), CP::Vec2.new(-22, -10), etc. :segment => CP::Shape::Segment # :segment, ... # TODO :image => # Special, just traces the extent of the image. @@ -36,9 +37,11 @@ params << CP::Body.new(self.mass, self.moment) params += args params << CP::Vec2.new(0.0, 0.0) unless CP::Vec2 === args.first @shape = shape_class.new *params + @shape.body.a = -Rotation::Quarter # default rotation + @shape end end def mass amount define_method :mass do amount \ No newline at end of file