add Lua binding

This commit is contained in:
Chris Danford
2005-02-16 02:11:31 +00:00
parent 4376c828e5
commit db86be45ba
4 changed files with 58 additions and 0 deletions
+22
View File
@@ -377,6 +377,28 @@ float PlayerStageStats::GetPercentageOfTaps( TapNoteScore tns ) const
}
// lua start
#include "LuaBinding.h"
template<class T>
class LunaPlayerStageStats : public Luna<T>
{
public:
LunaPlayerStageStats() { LUA->Register( Register ); }
static int GetCaloriesBurned( T* p, lua_State *L ) { lua_pushnumber(L, p->fCaloriesBurned ); return 1; }
static void Register(lua_State *L)
{
ADD_METHOD( GetCaloriesBurned )
Luna<T>::Register( L );
}
};
LUA_REGISTER_CLASS( PlayerStageStats )
// lua end
/*
* (c) 2001-2004 Chris Danford, Glenn Maynard
* All rights reserved.