[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [Tolua] How to store functions?
- From: Jose Marin <jose_marin2@...>
- Date: Mon, 21 Feb 2005 11:32:20 -0300 (ART)
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