mirror of https://github.com/axmolengine/axmol.git
Resolve the bug that requiring lua scrip did not consider the module dependent
This commit is contained in:
parent
50914665e6
commit
54d376db01
|
@ -1,3 +1,7 @@
|
|||
if nil == cc.CCBReader then
|
||||
return
|
||||
end
|
||||
|
||||
ccb = ccb or {}
|
||||
|
||||
function CCBReaderLoad(strFilePath,proxy,owner)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if nil == cc.CCBProxy then
|
||||
return
|
||||
end
|
||||
-- This is the DeprecatedCocosBuilderClass
|
||||
|
||||
DeprecatedCocosBuilderClass = {} or DeprecatedCocosBuilderClass
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
if nil == cc.SimpleAudioEngine then
|
||||
return
|
||||
end
|
||||
--Encapsulate SimpleAudioEngine to AudioEngine,Play music and sound effects.
|
||||
local M = {}
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if nil == cc.SimpleAudioEngine then
|
||||
return
|
||||
end
|
||||
-- This is the DeprecatedCocosDenshionClass
|
||||
|
||||
DeprecatedCocosDenshionClass = {} or DeprecatedCocosDenshionClass
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if nil == cc.SimpleAudioEngine then
|
||||
return
|
||||
end
|
||||
--tip
|
||||
local function deprecatedTip(old_name,new_name)
|
||||
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
if nil == ccs then
|
||||
return
|
||||
end
|
||||
|
||||
if not json then
|
||||
require "cocos.cocos2d.json"
|
||||
end
|
||||
|
||||
ccs = ccs or {}
|
||||
|
||||
require "cocos.cocostudio.StudioConstants"
|
||||
|
||||
function ccs.sendTriggerEvent(event)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if nil == ccs then
|
||||
return
|
||||
end
|
||||
-- This is the DeprecatedExtensionClass
|
||||
|
||||
DeprecatedExtensionClass = {} or DeprecatedExtensionClass
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if nil == ccs then
|
||||
return
|
||||
end
|
||||
|
||||
--tip
|
||||
local function deprecatedTip(old_name,new_name)
|
||||
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
ccs = ccs or {}
|
||||
if nil == ccs then
|
||||
return
|
||||
end
|
||||
|
||||
ccs.MovementEventType = {
|
||||
start = 0,
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
-- This is the DeprecatedExtensionClass
|
||||
if nil == cc.Control then
|
||||
return
|
||||
end
|
||||
|
||||
-- This is the DeprecatedExtensionClass
|
||||
DeprecatedExtensionClass = {} or DeprecatedExtensionClass
|
||||
|
||||
--tip
|
||||
|
@ -15,21 +18,6 @@ end
|
|||
_G["CCControl"] = DeprecatedExtensionClass.CCControl()
|
||||
--CCControl class will be Deprecated,end
|
||||
|
||||
--CCEditBox class will be Deprecated,begin
|
||||
function DeprecatedExtensionClass.CCEditBox()
|
||||
deprecatedTip("CCEditBox","ccui.EditBox")
|
||||
return ccui.EditBox
|
||||
end
|
||||
_G["CCEditBox"] = DeprecatedExtensionClass.CCEditBox()
|
||||
|
||||
function DeprecatedExtensionClass.CCUIEditBox()
|
||||
deprecatedTip("cc.EditBox","ccui.EditBox")
|
||||
return ccui.EditBox
|
||||
end
|
||||
_G["cc"]["EditBox"] = DeprecatedExtensionClass.CCUIEditBox()
|
||||
|
||||
--CCEditBox class will be Deprecated,end
|
||||
|
||||
--CCScrollView class will be Deprecated,begin
|
||||
function DeprecatedExtensionClass.CCScrollView()
|
||||
deprecatedTip("CCScrollView","cc.ScrollView")
|
||||
|
@ -102,6 +90,34 @@ end
|
|||
_G["CCControlButton"] = DeprecatedExtensionClass.CCControlButton()
|
||||
--CCControlButton class will be Deprecated,end
|
||||
|
||||
--CCControlColourPicker class will be Deprecated,begin
|
||||
function DeprecatedExtensionClass.CCControlColourPicker()
|
||||
deprecatedTip("CCControlColourPicker","cc.ControlColourPicker")
|
||||
return cc.ControlColourPicker
|
||||
end
|
||||
_G["CCControlColourPicker"] = DeprecatedExtensionClass.CCControlColourPicker()
|
||||
--CCControlColourPicker class will be Deprecated,end
|
||||
|
||||
|
||||
if nil == ccui then
|
||||
return
|
||||
end
|
||||
|
||||
--CCEditBox class will be Deprecated,begin
|
||||
function DeprecatedExtensionClass.CCEditBox()
|
||||
deprecatedTip("CCEditBox","ccui.EditBox")
|
||||
return ccui.EditBox
|
||||
end
|
||||
_G["CCEditBox"] = DeprecatedExtensionClass.CCEditBox()
|
||||
|
||||
function DeprecatedExtensionClass.CCUIEditBox()
|
||||
deprecatedTip("cc.EditBox","ccui.EditBox")
|
||||
return ccui.EditBox
|
||||
end
|
||||
_G["cc"]["EditBox"] = DeprecatedExtensionClass.CCUIEditBox()
|
||||
|
||||
--CCEditBox class will be Deprecated,end
|
||||
|
||||
--CCScale9Sprite class will be Deprecated,begin
|
||||
function DeprecatedExtensionClass.CCScale9Sprite()
|
||||
deprecatedTip("CCScale9Sprite","ccui.Scale9Sprite")
|
||||
|
@ -116,11 +132,3 @@ end
|
|||
_G["cc"]["Scale9Sprite"] = DeprecatedExtensionClass.UIScale9Sprite()
|
||||
--CCScale9Sprite class will be Deprecated,end
|
||||
|
||||
--CCControlColourPicker class will be Deprecated,begin
|
||||
function DeprecatedExtensionClass.CCControlColourPicker()
|
||||
deprecatedTip("CCControlColourPicker","cc.ControlColourPicker")
|
||||
return cc.ControlColourPicker
|
||||
end
|
||||
_G["CCControlColourPicker"] = DeprecatedExtensionClass.CCControlColourPicker()
|
||||
--CCControlColourPicker class will be Deprecated,end
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if nil == cc.Control then
|
||||
return
|
||||
end
|
||||
|
||||
_G.kCCControlStepperPartMinus = cc.CONTROL_STEPPER_PART_MINUS
|
||||
_G.kCCControlStepperPartPlus = cc.CONTROL_STEPPER_PART_PLUS
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if nil == cc.Control then
|
||||
return
|
||||
end
|
||||
|
||||
--tip
|
||||
local function deprecatedTip(old_name,new_name)
|
||||
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
cc = cc or {}
|
||||
if nil == cc.Control then
|
||||
return
|
||||
end
|
||||
|
||||
cc.CONTROL_STATE_NORMAL = 1
|
||||
cc.CONTROL_STATE_HIGH_LIGHTED = 2
|
||||
|
|
|
@ -35,16 +35,23 @@ else
|
|||
-- audio
|
||||
require "cocos.cocosdenshion.AudioEngine"
|
||||
-- cocosstudio
|
||||
if nil ~= ccs then
|
||||
require "cocos.cocostudio.CocoStudio"
|
||||
end
|
||||
-- ui
|
||||
if nil ~= ccui then
|
||||
require "cocos.ui.GuiConstants"
|
||||
require "cocos.ui.experimentalUIConstants"
|
||||
end
|
||||
|
||||
-- extensions
|
||||
require "cocos.extension.ExtensionConstants"
|
||||
-- network
|
||||
require "cocos.network.NetworkConstants"
|
||||
-- Spine
|
||||
if nil ~= sp then
|
||||
require "cocos.spine.SpineConstants"
|
||||
end
|
||||
|
||||
require "cocos.cocos2d.deprecated"
|
||||
require "cocos.cocos2d.DrawPrimitives"
|
||||
|
@ -59,8 +66,11 @@ else
|
|||
require "cocos.cocos2d.DeprecatedOpenglEnum"
|
||||
|
||||
-- register_cocostudio_module
|
||||
if nil ~= ccs then
|
||||
require "cocos.cocostudio.DeprecatedCocoStudioClass"
|
||||
require "cocos.cocostudio.DeprecatedCocoStudioFunc"
|
||||
end
|
||||
|
||||
|
||||
-- register_cocosbuilder_module
|
||||
require "cocos.cocosbuilder.DeprecatedCocosBuilderClass"
|
||||
|
@ -80,8 +90,10 @@ else
|
|||
require "cocos.network.DeprecatedNetworkFunc"
|
||||
|
||||
-- register_ui_moudle
|
||||
if nil ~= ccui then
|
||||
require "cocos.ui.DeprecatedUIEnum"
|
||||
require "cocos.ui.DeprecatedUIFunc"
|
||||
end
|
||||
|
||||
-- cocosbuilder
|
||||
require "cocos.cocosbuilder.CCBReaderLoad"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if nil == cc.XMLHttpRequest then
|
||||
return
|
||||
end
|
||||
-- This is the DeprecatedNetworkClass
|
||||
|
||||
DeprecatedNetworkClass = {} or DeprecatedNetworkClass
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if nil == cc.XMLHttpRequest then
|
||||
return
|
||||
end
|
||||
|
||||
_G.kWebSocketScriptHandlerOpen = cc.WEBSOCKET_OPEN
|
||||
_G.kWebSocketScriptHandlerMessage = cc.WEBSOCKET_MESSAGE
|
||||
_G.kWebSocketScriptHandlerClose = cc.WEBSOCKET_CLOSE
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if nil == cc.XMLHttpRequest then
|
||||
return
|
||||
end
|
||||
|
||||
--tip
|
||||
local function deprecatedTip(old_name,new_name)
|
||||
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
cc = cc or {}
|
||||
if nil == cc.XMLHttpRequest then
|
||||
return
|
||||
end
|
||||
|
||||
cc.WEBSOCKET_OPEN = 0
|
||||
cc.WEBSOCKET_MESSAGE = 1
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
sp = sp or {}
|
||||
if nil == sp then
|
||||
return
|
||||
end
|
||||
|
||||
sp.EventType =
|
||||
{
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
if nil == ccui then
|
||||
return
|
||||
end
|
||||
|
||||
LAYOUT_COLOR_NONE = ccui.LayoutBackGroundColorType.none
|
||||
LAYOUT_COLOR_SOLID = ccui.LayoutBackGroundColorType.solid
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if nil == ccui then
|
||||
return
|
||||
end
|
||||
|
||||
--tip
|
||||
local function deprecatedTip(old_name,new_name)
|
||||
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
ccui = ccui or {}
|
||||
if nil == ccui then
|
||||
return
|
||||
end
|
||||
|
||||
ccui.BrightStyle =
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
ccexp = ccexp or {}
|
||||
|
||||
if nil == ccexp then
|
||||
return
|
||||
end
|
||||
|
||||
ccexp.VideoPlayerEvent = {
|
||||
PLAYING = 0,
|
||||
|
|
Loading…
Reference in New Issue