lua-users home
lua-l archive

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


Hi.

What´s the fastest way of mapping a C++ object (or C
struct) to Lua?


In C++ 

class NPC{
 int health;
 vector3 position;
 // other attributes

 void Move();
 // other methods
};


In LUA

 enemy1.health = 100
 enemy1.Move()



If is there some way of map fast a C struct to a LUA
variable, this will be enough.

Note:
 I wont use tolua, great tool, but I want to learn how
to do this myself


______________________________________________________________________

Conheça a nova central de informações anti-spam do Yahoo! Mail:
http://www.yahoo.com.br/antispam