Concrete views are specific for each back-end. View can also be used to implements camera and other fun things.
scene2d :: View :: defaultinit
scene2d :: View :: draw_sprite
Draw a specific sprite on the viewcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
scene2d :: View :: defaultinit
core :: Object :: defaultinit
scene2d :: View :: draw_sprite
Draw a specific sprite on the viewcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).
# Abstract view do draw sprites
#
# Concrete views are specific for each back-end.
# View can also be used to implements camera and other fun things.
interface View
# Draw a specific sprite on the view
#
# This method must be implemented for each specific view.
# A traditional way of implementation is to use a double-dispatch mechanism
#
# class MyView
# super View
# redef fun draw_sprite(s) do s.draw_on_myview(self)
# end
# redef class Sprite
# # How to draw a sprite on my specific view
# fun draw_on_myview(myview: MyView) is abstract
# end
fun draw_sprite(s: Sprite) is abstract
end
lib/scene2d/scene2d.nit:147,1--166,3