MainScene.lua require("src.app.scenes.MainSceneEx") local MainScene = class("MainScene", function() return display.newScene("MainScene") end) function MainScene:ctor() self.a=3 self.b=4 print( add(self)) end return MainScene
MainSceneEx.lua
function add(self_) return self_.a+self_.b end