Lua supports using metatables to give Lua class inheritance. In this example, we allow vectors to have their values multiplied by a constant in a derived class.
確定! 回上一頁