Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LuaObj(IEntity)
- {
- function(IEntity, __tostring)
- lua_pushfstring(L, "IEntity[%d][%s]", self->GetId(), self->GetClass()->GetName());
- end
- function(IEntity, __len)
- lua_pushnumber(L, self->GetId());
- end
- function(IEntity, GetClass)
- lua_pushstring(L, self->GetClass()->GetName());
- end
- function(IEntity, Remove)
- gEnv->pEntitySystem->RemoveEntity(self->GetId(), true);
- end0
- function(IEntity, SetSize)
- self->SetScale(Vec3(1,1,1) * lua_tonumber(L, 2));
- ends
- void Load()
- {
- reg(IEntity, SetSize);
- reg(IEntity, __tostring);
- reg(IEntity, __len);
- reg(IEntity, Remove);
- reg__newindex(IEntity);
- reg__index(IEntity);
- reg__eq(IEntity);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment