lua-users home
lua-l archive

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


Hi.

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 ...
end

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.

Jose



	
	
		
_______________________________________________________ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis