- Timestamp:
- Jun 14, 2006, 5:33:06 PM (18 years ago)
- Location:
- branches/script_engine/src/lib/script_engine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/account.cc
r8405 r8406 15 15 lua_Number m_balance; 16 16 public: 17 // static const char className[];18 static Lunar<Account>::RegType methods[];19 20 17 Account(lua_State *L) { m_balance = luaL_checknumber(L, 1); } 21 18 Account(double balance=0) : m_balance(balance) { this->setClassID(CL_ACCOUNT, "Account"); } … … 31 28 }; 32 29 33 //const char Account::className[] = "Account";34 30 35 Lunar<Account>::RegType Account::methods[] = {36 {"deposit", new ExecutorLua1<Account, float>(&Account::deposit)},37 {"withdraw", new ExecutorLua1<Account, float>(&Account::withdraw)},38 {"balance", new ExecutorLua0ret<Account, float>(&Account::balance)},39 {0,NULL}40 };41 31 42 32 CREATE_SCRIPTABLE_CLASS(Account, CL_ACCOUNT, -
branches/script_engine/src/lib/script_engine/object.cc
r8404 r8406 11 11 { 12 12 public: 13 static const char className[];14 static Lunar<Object>::RegType methods[];15 16 13 Object(lua_State* L) {callCount = 0; } 17 14 Object(){callCount = 0;this->setClassID(CL_TEST_OBJECT, "Object");};
Note: See TracChangeset
for help on using the changeset viewer.