I need to extend from multiple classes. I've created a classe named animate (animate = Core.class()) And i have to extend these in other classes like: mesh = Core.class(Mesh, animate). This is to use the animate methods.
I abstracted some gideros classes/methods to make more easy to use. Example:
mesh = Core.class(Mesh)-- some methods to abstract Mesh classlocal background = mesh.new()
background:addVertice(0, 0)-- addVertice() make the relation with the Mesh directly
background:addVertice(0, 100)
background:addVertice(100, 100)
background:addVertice(0, 0)
With your example, i will implement the animation, transformation etc.. classes, for Bitmap, Sprite, Shape, Mesh, and methods like addVertice for example can be used in Shape or Mesh classes, its amazing \o/
Comments
Use aggregation instead of inheritance or try this http://www.lua.org/pil/16.3.html
as:
ar2rsawseen: up would work, but the classes that going to extend the animate are: sprite, mesh and bitmap, then it would not work.
So, maybe you just want a Sprite interface to implement the animation?
If so, then you can write:
I abstracted some gideros classes/methods to make more easy to use.
Example:
thanks asakharov and ar2rsawseen for Help.