lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


My actors have a struct like this:

struct Actor{
  ... Some fields ...
  Function OnCollide;
  ... Other events  

If two actors collide, I must call (in C++) the
OnColide function of both.

On the Lua code:

function ogreCollide()
  -- some code ...

monsterOgre = Actor:new()

monsterOgre.OnCollide = ogreCollide

How do I create a header for tolua handle this?
I've read the docs, but couldn't find how...

Is there some way of doing this without tolua?

Thanks for any tip.


Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. - Internet rápida e grátis