[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using tolua in real games.
- From: Jose Marin <jose_marin2@...>
- Date: Thu, 8 Jan 2004 07:34:54 -0300 (ART)
All I wanto to do is the following:
In C I have the functions:
int FuncNew();
void FuncSetPos(int ref, float x, float y, float z);
void FuncDelete(int ref);
The first parameter (ref) must be passed to all
funcs(except FuncNew, that will return the reference).
In Lua, I would like to do this:
obj = FuncNew()
OK, just return the reference for the new object.
obj:SetPos(12, 13, 14)
must call FuncSetPos like this:
FuncSetPos(obj.ref, 12, 13, 14)
obj:Delete()
must call FuncDelete like this:
FuncDelete(obj.ref)
Whats the more efficient way of doing this?
______________________________________________________________________
Conheça a nova central de informações anti-spam do Yahoo! Mail:
http://www.yahoo.com.br/antispam