3 #include "shotmanager.h"
6 void Weapon::desenha() {
10 void Weapon::fire(Ponto place
, double angle
, Shooter
* _firedBy
) {
12 lua_pushlightuserdata(lstate
, (void *)this);
13 lua_gettable(lstate
, LUA_REGISTRYINDEX
);//obter funcao do script
15 lua_pushnumber(lstate
, place
.x
);
16 lua_pushnumber(lstate
, place
.y
);
17 lua_pushnumber(lstate
, angle
);
18 lua_pushlightuserdata(lstate
, this);
20 if (lua_pcall(lstate
,4,0,0) != 0) /* do the call */
21 printf("error: %s", lua_tostring(lstate
, -1));