Class: Reflex::Shape

Inherits:
Object
  • Object
show all
Includes:
HasFrame, HasTags, Hookable, Xot::Setter
Defined in:
lib/reflex/shape.rb

Direct Known Subclasses

EllipseShape, LineShape, PolygonShape, RectShape

Instance Method Summary collapse

Methods included from HasTags

#clear_tags, #tag, #tag=, #tags, #untag

Methods included from HasFrame

#inset_by, #move_by, #move_to, #resize_by, #resize_to

Methods included from Hookable

#hook

Constructor Details

#initialize(options = nil, &block) ⇒ Shape

Returns a new instance of Shape.



24
25
26
27
28
# File 'lib/reflex/shape.rb', line 24

def initialize(options = nil, &block)
  super()
  set options if options
  Xot::BlockUtil.instance_eval_or_block_call self, &block if block
end

Instance Method Details

#on_contact(e) ⇒ Object



30
31
# File 'lib/reflex/shape.rb', line 30

def on_contact(e)
end

#on_contact_begin(e) ⇒ Object



33
34
# File 'lib/reflex/shape.rb', line 33

def on_contact_begin(e)
end

#on_contact_end(e) ⇒ Object



36
37
# File 'lib/reflex/shape.rb', line 36

def on_contact_end(e)
end