Player = {}
Player.__index = Player
function Player.New()
local obj = { name = "default" }
setmetatable(obj,Player)
return obj
end
function Player:Speak()
print(self.name."say hello")
end
local player = Player.New()
player:Speak()
10 lua 类
最新推荐文章于 2021-08-04 21:12:40 发布