Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8105 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 1, 2006, 10:16:40 PM (19 years ago)
Author:
snellen
Message:


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/example.cc

    r8104 r8105  
    4545        ~Object() { printf("deleted Object (%p)\n", this); }
    4646
     47        //lua Interface
     48        //function that returns a value to lua
     49        int getCallCount(lua_State* L)
     50        {
     51         int calls = getCallCount();
     52         lua_pushnumber(L,(lua_Number)calls);
     53         return 1; // return number of values that the function wants to return to lua
     54        }
     55
     56         //function that takes an argument from lua
     57         int takeParam(lua_State* L)
     58         {
     59          int param = (int)lua_tonumber(L,-1);
     60          takeParam(param);
     61          return 0;
     62         }
     63
     64        //meber functions
    4765        void takeParam(int i)
    4866        {
Note: See TracChangeset for help on using the changeset viewer.