2019-11-23 20:27:39 +08:00
|
|
|
--[[
|
|
|
|
|
|
|
|
Copyright (c) 2014-2017 Chukong Technologies Inc.
|
2022-02-12 19:56:00 +08:00
|
|
|
Copyright (c) 2022 Bytedance Inc.
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
|
|
|
|
|
|
|
]]
|
|
|
|
|
2021-10-08 16:15:33 +08:00
|
|
|
-- >= lua-5.4
|
2021-04-22 22:01:47 +08:00
|
|
|
if (math.pow == nil) then
|
|
|
|
math.pow = function (x,y)
|
|
|
|
return x ^ y
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-10-08 16:15:33 +08:00
|
|
|
-- < lua-5.4
|
|
|
|
if (unpack) then
|
|
|
|
table.unpack = unpack
|
|
|
|
end
|
|
|
|
|
2022-07-12 21:31:54 +08:00
|
|
|
-- < axis-1.0
|
|
|
|
cc = ax
|
|
|
|
cc.Director.setDisplayStats = ax.Director.setStatsDisplay
|
|
|
|
cc.Sprite3D = ax.MeshRenderer
|
|
|
|
ccexp = axexp
|
|
|
|
ccui = axui
|
|
|
|
ccb = axb
|
|
|
|
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.cocos2d.Cocos2d"
|
|
|
|
require "cocos.cocos2d.Cocos2dConstants"
|
|
|
|
require "cocos.cocos2d.functions"
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
__G__TRACKBACK__ = function(msg)
|
|
|
|
local msg = debug.traceback(msg, 3)
|
|
|
|
print(msg)
|
|
|
|
return msg
|
|
|
|
end
|
|
|
|
|
|
|
|
-- cocosstudio
|
|
|
|
if nil ~= ccs then
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.cocostudio.CocoStudio"
|
2019-11-23 20:27:39 +08:00
|
|
|
end
|
|
|
|
-- ui
|
|
|
|
if nil ~= ccui then
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.ui.GuiConstants"
|
2019-11-23 20:27:39 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
-- extensions
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.extension.ExtensionConstants"
|
2019-11-23 20:27:39 +08:00
|
|
|
-- network
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.network.NetworkConstants"
|
2019-11-23 20:27:39 +08:00
|
|
|
-- Spine
|
|
|
|
if nil ~= sp then
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.spine.SpineConstants"
|
2019-11-23 20:27:39 +08:00
|
|
|
end
|
|
|
|
|
2022-08-16 14:39:02 +08:00
|
|
|
-- require "cocos.cocos2d.deprecated"
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
-- Lua extensions
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.cocos2d.bitExtend"
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
-- CCLuaEngine
|
2022-08-16 14:39:02 +08:00
|
|
|
-- require "cocos.cocos2d.DeprecatedCocos2dClass"
|
|
|
|
-- require "cocos.cocos2d.DeprecatedCocos2dEnum"
|
|
|
|
-- require "cocos.cocos2d.DeprecatedCocos2dFunc"
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
-- register_cocostudio_module
|
|
|
|
-- if nil ~= ccs then
|
2022-08-16 14:39:02 +08:00
|
|
|
-- require "cocos.cocostudio.DeprecatedCocoStudioClass"
|
|
|
|
-- require "cocos.cocostudio.DeprecatedCocoStudioFunc"
|
2019-11-23 20:27:39 +08:00
|
|
|
-- end
|
|
|
|
|
|
|
|
-- register_extension_module
|
2022-08-16 14:39:02 +08:00
|
|
|
-- require "cocos.extension.DeprecatedExtensionClass"
|
|
|
|
-- require "cocos.extension.DeprecatedExtensionEnum"
|
|
|
|
-- require "cocos.extension.DeprecatedExtensionFunc"
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
-- register_network_module
|
2022-08-16 14:39:02 +08:00
|
|
|
-- require "cocos.network.DeprecatedNetworkClass"
|
|
|
|
-- require "cocos.network.DeprecatedNetworkEnum"
|
|
|
|
-- require "cocos.network.DeprecatedNetworkFunc"
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
-- register_ui_module
|
|
|
|
-- if nil ~= ccui then
|
2022-08-16 14:39:02 +08:00
|
|
|
-- require "cocos.ui.DeprecatedUIEnum"
|
|
|
|
-- require "cocos.ui.DeprecatedUIFunc"
|
2019-11-23 20:27:39 +08:00
|
|
|
-- end
|
|
|
|
|
|
|
|
-- physics3d
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.physics3d.physics3d-constants"
|
2019-11-23 20:27:39 +08:00
|
|
|
|
2022-07-16 10:43:05 +08:00
|
|
|
if AX_USE_FRAMEWORK then
|
2022-08-16 14:39:02 +08:00
|
|
|
require "cocos.framework.init"
|
2019-11-23 20:27:39 +08:00
|
|
|
end
|