Migrte lua script files

This commit is contained in:
halx99 2022-08-15 16:28:32 +08:00
parent b580991236
commit 6de08175bb
10 changed files with 52 additions and 52 deletions

View File

@ -4,7 +4,7 @@ end
local json = require 'cjson'
require "cocos.cocostudio.StudioConstants"
require "axys.cocostudio.StudioConstants"
function ccs.sendTriggerEvent(event)
local triggerObjArr = ccs.TriggerMng.getInstance():get(event)

View File

@ -29,30 +29,30 @@ printInfo("")
printInfo("# DEBUG = " .. DEBUG)
printInfo("#")
device = require("cocos.framework.device")
display = require("cocos.framework.display")
transition = require("cocos.framework.transition")
device = require("axys.framework.device")
display = require("axys.framework.display")
transition = require("axys.framework.transition")
require("cocos.framework.extends.NodeEx")
require("cocos.framework.extends.SpriteEx")
require("cocos.framework.extends.LayerEx")
require("cocos.framework.extends.MenuEx")
require("axys.framework.extends.NodeEx")
require("axys.framework.extends.SpriteEx")
require("axys.framework.extends.LayerEx")
require("axys.framework.extends.MenuEx")
if ccui then
require("cocos.framework.extends.UIWidget")
require("cocos.framework.extends.UICheckBox")
require("cocos.framework.extends.UIEditBox")
require("cocos.framework.extends.UIListView")
require("cocos.framework.extends.UIPageView")
require("cocos.framework.extends.UIScrollView")
require("cocos.framework.extends.UISlider")
require("cocos.framework.extends.UITextField")
require("axys.framework.extends.UIWidget")
require("axys.framework.extends.UICheckBox")
require("axys.framework.extends.UIEditBox")
require("axys.framework.extends.UIListView")
require("axys.framework.extends.UIPageView")
require("axys.framework.extends.UIScrollView")
require("axys.framework.extends.UISlider")
require("axys.framework.extends.UITextField")
end
require("cocos.framework.package_support")
require("axys.framework.package_support")
-- register the build-in packages
cc.register("event", require("cocos.framework.components.event"))
cc.register("event", require("axys.framework.components.event"))
-- export global variable
local __g = _G

View File

@ -43,9 +43,9 @@ ccexp = axexp
ccui = axui
ccb = axb
require "cocos.cocos2d.Cocos2d"
require "cocos.cocos2d.Cocos2dConstants"
require "cocos.cocos2d.functions"
require "axys.cocos2d.Cocos2d"
require "axys.cocos2d.Cocos2dConstants"
require "axys.cocos2d.functions"
__G__TRACKBACK__ = function(msg)
local msg = debug.traceback(msg, 3)
@ -55,57 +55,57 @@ end
-- cocosstudio
if nil ~= ccs then
require "cocos.cocostudio.CocoStudio"
require "axys.cocostudio.CocoStudio"
end
-- ui
if nil ~= ccui then
require "cocos.ui.GuiConstants"
require "axys.ui.GuiConstants"
end
-- extensions
require "cocos.extension.ExtensionConstants"
require "axys.extension.ExtensionConstants"
-- network
require "cocos.network.NetworkConstants"
require "axys.network.NetworkConstants"
-- Spine
if nil ~= sp then
require "cocos.spine.SpineConstants"
require "axys.spine.SpineConstants"
end
-- require "cocos.cocos2d.deprecated"
-- require "axys.cocos2d.deprecated"
-- Lua extensions
require "cocos.cocos2d.bitExtend"
require "axys.cocos2d.bitExtend"
-- CCLuaEngine
-- require "cocos.cocos2d.DeprecatedCocos2dClass"
-- require "cocos.cocos2d.DeprecatedCocos2dEnum"
-- require "cocos.cocos2d.DeprecatedCocos2dFunc"
-- require "axys.cocos2d.DeprecatedCocos2dClass"
-- require "axys.cocos2d.DeprecatedCocos2dEnum"
-- require "axys.cocos2d.DeprecatedCocos2dFunc"
-- register_cocostudio_module
-- if nil ~= ccs then
-- require "cocos.cocostudio.DeprecatedCocoStudioClass"
-- require "cocos.cocostudio.DeprecatedCocoStudioFunc"
-- require "axys.cocostudio.DeprecatedCocoStudioClass"
-- require "axys.cocostudio.DeprecatedCocoStudioFunc"
-- end
-- register_extension_module
-- require "cocos.extension.DeprecatedExtensionClass"
-- require "cocos.extension.DeprecatedExtensionEnum"
-- require "cocos.extension.DeprecatedExtensionFunc"
-- require "axys.extension.DeprecatedExtensionClass"
-- require "axys.extension.DeprecatedExtensionEnum"
-- require "axys.extension.DeprecatedExtensionFunc"
-- register_network_module
-- require "cocos.network.DeprecatedNetworkClass"
-- require "cocos.network.DeprecatedNetworkEnum"
-- require "cocos.network.DeprecatedNetworkFunc"
-- require "axys.network.DeprecatedNetworkClass"
-- require "axys.network.DeprecatedNetworkEnum"
-- require "axys.network.DeprecatedNetworkFunc"
-- register_ui_module
-- if nil ~= ccui then
-- require "cocos.ui.DeprecatedUIEnum"
-- require "cocos.ui.DeprecatedUIFunc"
-- require "axys.ui.DeprecatedUIEnum"
-- require "axys.ui.DeprecatedUIFunc"
-- end
-- physics3d
require "cocos.physics3d.physics3d-constants"
require "axys.physics3d.physics3d-constants"
if AX_USE_FRAMEWORK then
require "cocos.framework.init"
require "axys.framework.init"
end

View File

@ -1,5 +1,5 @@
require "config"
require "cocos.init"
require "axys.init"
local function main()
require("app.MyApp"):create():run()

View File

@ -1,4 +1,4 @@
require "cocos.init"
require "axys.init"
require "ComponentTest/gameoverscene"
local scene = {

View File

@ -63,7 +63,7 @@ local function LuaBridgeLayer()
if (cc.PLATFORM_OS_ANDROID == targetPlatform) then
local args = { 2 , 3}
local sigs = "(II)I"
local luaj = require "cocos.cocos2d.luaj"
local luaj = require "axys.cocos2d.luaj"
local className = "com/cocos2dx/sample/LuaJavaBridgeTest/LuaJavaBridgeTest"
local ok,ret = luaj.callStaticMethod(className,"addTwoNumbers",args,sigs)
if not ok then
@ -102,7 +102,7 @@ local function LuaBridgeLayer()
subtitleLabel:setString("See the console.")
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) or (cc.PLATFORM_OS_MAC == targetPlatform) then
local args = { num1 = 2 , num2 = 3 }
local luaoc = require "cocos.cocos2d.luaoc"
local luaoc = require "axys.cocos2d.luaoc"
local className = "LuaObjectCBridgeTest"
local ok,ret = luaoc.callStaticMethod(className,"addTwoNumbers",args)
if not ok then
@ -138,7 +138,7 @@ local function LuaBridgeLayer()
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) or (cc.PLATFORM_OS_MAC == targetPlatform) then
local args = {name = "jett" ,method = "call OC"}
local args_tab = {tab = args , name = "table_test"}
local luaoc = require "cocos.cocos2d.luaoc"
local luaoc = require "axys.cocos2d.luaoc"
local className = "LuaObjectCBridgeTest"
local ok,ret = luaoc.callStaticMethod(className,"printLuaTableToDictionary",args_tab)

View File

@ -1,4 +1,4 @@
require "cocos.spine.SpineConstants"
require "axys.spine.SpineConstants"
local SpineTestLayerNormal = class("SpineTestLayerNormal",function()
return cc.Layer:create()

View File

@ -1,4 +1,4 @@
require "cocos.3d.3dConstants"
require "axys.3d.3dConstants"
local size = cc.Director:getInstance():getWinSize()
local scheduler = cc.Director:getInstance():getScheduler()

View File

@ -1,4 +1,4 @@
require "cocos.3d.3dConstants"
require "axys.3d.3dConstants"
----------------------------------------
----TerrainSimple

View File

@ -10,7 +10,7 @@ end
----------------
-- run
AX_USE_DEPRECATED_API = true
require "cocos.init"
require "axys.init"
local director = cc.Director:getInstance()
local glView = director:getOpenGLView()