Add LifeMeterBattery:GetLivesLeft() Lua binding.

This commit is contained in:
AJ Kelly
2010-05-18 18:06:49 -05:00
parent 5903c2448a
commit 97a6696b65
2 changed files with 20 additions and 0 deletions
+16
View File
@@ -231,6 +231,22 @@ void LifeMeterBattery::Update( float fDeltaTime )
}
}
// lua start
#include "LuaBinding.h"
class LunaLifeMeterBattery: public Luna<LifeMeterBattery>
{
public:
static int GetLivesLeft( T* p, lua_State *L ) { lua_pushnumber( L, p->GetLivesLeft() ); return 1; }
LunaLifeMeterBattery()
{
ADD_METHOD( GetLivesLeft );
}
};
LUA_REGISTER_DERIVED_CLASS( LifeMeterBattery, LifeMeter )
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.