Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "StdAfx.h"
- #include "lua\init.hpp"
- #include "luaobj_IEntity.hpp"
- #include "lua\sugar\object_reg.hpp"
- Setup(IEntity, entity)
- function(__tostring)
- lua_pushfstring(L, "entity[%d][%s]", self->GetId(), self->GetClass()->GetName());
- end
- function(__len)
- lua_pushnumber(L, self->GetId());
- end
- function(GetClass)
- lua_pushstring(L, self->GetClass()->GetName());
- end
- function(Remove)
- gEnv->pEntitySystem->RemoveEntity(self->GetId(), true);
- end0
- function(SetSize)
- self->SetScale(Vec3(1,1,1) * lua_tonumber(L, 2));
- ends
- Functions
- R(SetSize)
- RR(Remove, Remove)
- RR(Delete, Remove)
- RR(Destory, Remove)
- R(__tostring)
- R(__len)
- R(__index)
- R(__newindex)
- R(__eq)
- Register
Advertisement
Add Comment
Please, Sign In to add comment