Migrate lua scripts, remove deprecated files

This commit is contained in:
halx99 2022-10-07 21:24:11 +08:00
parent a4698809f2
commit 29d4e3209e
20 changed files with 4 additions and 3525 deletions

View File

@ -1,81 +0,0 @@
--Enums will be deprecated,begin
_G.kCCTextAlignmentLeft = cc.TEXT_ALIGNMENT_LEFT
_G.kCCTextAlignmentRight = cc.TEXT_ALIGNMENT_RIGHT
_G.kCCTextAlignmentCenter = cc.TEXT_ALIGNMENT_CENTER
_G.kCCVerticalTextAlignmentTop = cc.VERTICAL_TEXT_ALIGNMENT_TOP
_G.kCCVerticalTextAlignmentCenter = cc.VERTICAL_TEXT_ALIGNMENT_CENTER
_G.kCCVerticalTextAlignmentBottom = cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM
_G.kCCDirectorProjection3D = cc.DIRECTOR_PROJECTION3_D
_G.kCCDirectorProjection2D = cc.DIRECTOR_PROJECTION2_D
_G.kCCDirectorProjectionCustom = cc.DIRECTOR_PROJECTION_CUSTOM
_G.kCCDirectorProjectionDefault = cc.DIRECTOR_PROJECTION_DEFAULT
_G.kCCNodeTagInvalid = cc.NODE_TAG_INVALID
_G.kCCNodeOnEnter = cc.NODE_ON_ENTER
_G.kCCNodeOnExit = cc.NODE_ON_EXIT
-- _G.kCCTexture2DPixelFormat_RGBA8888 = cc.TEXTURE_PF_RGBA8
-- _G.kCCTexture2DPixelFormat_RGB888 = cc.TEXTURE_PF_RGB8
-- _G.kCCTexture2DPixelFormat_RGB565 = cc.TEXTURE_PF_RGB565
-- _G.kCCTexture2DPixelFormat_A8 = cc.TEXTURE_PF_A8
-- _G.kCCTexture2DPixelFormat_I8 = cc.TEXTURE_PF_I8
-- _G.kCCTexture2DPixelFormat_AI88 = cc.TEXTURE_PF_LA8
-- _G.kCCTexture2DPixelFormat_RGBA4444 = cc.TEXTURE_PF_RGBA4
-- _G.kCCTexture2DPixelFormat_RGB5A1 = cc.TEXTURE_PF_RGB5A1
-- _G.kCCTexture2DPixelFormat_PVRTC4 = cc.TEXTURE_PF_PVRTC4
-- _G.kCCTexture2DPixelFormat_PVRTC2 = cc.TEXTURE_PF_PVRTC2
-- _G.kCCTexture2DPixelFormat_Default = cc.TEXTURE_PF_RGBA8
_G.kCCImageFormatPNG = cc.IMAGE_FORMAT_PNG
_G.kCCImageFormatJPEG = cc.IMAGE_FORMAT_JPEG
_G.kCCTouchesOneByOne = cc.TOUCHES_ONE_BY_ONE
_G.kCCTouchesAllAtOnce = cc.TOUCHES_ALL_AT_ONCE
_G.kCCTransitionOrientationLeftOver = cc.TRANSITION_ORIENTATION_LEFT_OVER
_G.kCCTransitionOrientationRightOver = cc.TRANSITION_ORIENTATION_RIGHT_OVER
_G.kCCTransitionOrientationUpOver = cc.TRANSITION_ORIENTATION_UP_OVER
_G.kCCTransitionOrientationDownOver = cc.TRANSITION_ORIENTATION_DOWN_OVER
_G.kCCActionTagInvalid = cc.ACTION_TAG_INVALID
_G.kCCLabelAutomaticWidth = cc.LABEL_AUTOMATIC_WIDTH
_G.kCCMenuStateWaiting = cc.MENU_STATE_WAITING
_G.kCCMenuStateTrackingTouch = cc.MENU_STATE_TRACKING_TOUCH
_G.kCCMenuHandlerPriority = cc.MENU_HANDLER_PRIORITY
_G.kCCParticleDurationInfinity = cc.PARTICLE_DURATION_INFINITY
_G.kCCParticleStartSizeEqualToEndSize = cc.PARTICLE_START_SIZE_EQUAL_TO_END_SIZE
_G.kCCParticleStartRadiusEqualToEndRadius = cc.PARTICLE_START_RADIUS_EQUAL_TO_END_RADIUS
_G.kCCParticleModeGravity = cc.PARTICLE_MODE_GRAVITY
_G.kCCParticleModeRadius = cc.PARTICLE_MODE_RADIUS
_G.kCCPositionTypeFree = cc.POSITION_TYPE_FREE
_G.kCCPositionTypeRelative = cc.POSITION_TYPE_RELATIVE
_G.kCCPositionTypeGrouped = cc.POSITION_TYPE_GROUPED
_G.kCCProgressTimerTypeRadial = cc.PROGRESS_TIMER_TYPE_RADIAL
_G.kCCProgressTimerTypeBar = cc.PROGRESS_TIMER_TYPE_BAR
_G.kCCTMXTileHorizontalFlag = cc.TMX_TILE_HORIZONTAL_FLAG
_G.kCCTMXTileVerticalFlag = cc.TMX_TILE_VERTICAL_FLAG
_G.kCCTMXTileDiagonalFlag = cc.TMX_TILE_DIAGONAL_FLAG
_G.kCCFlipedAll = cc.FLIPED_ALL
_G.kCCFlippedMask = cc.FLIPPED_MASK
cc.PLATFORM_OS_WINDOWS = cc.PLATFORM_WINDOWS
cc.PLATFORM_OS_LINUX = cc.PLATFORM_LINUX
cc.PLATFORM_OS_MAC = cc.PLATFORM_MACOS
cc.PLATFORM_OS_ANDROID = cc.PLATFORM_ANDROID
cc.PLATFORM_OS_IPHONE = cc.PLATFORM_IOS
_G.kLanguageEnglish = cc.LANGUAGE_ENGLISH
_G.kLanguageChinese = cc.LANGUAGE_CHINESE
_G.kLanguageFrench = cc.LANGUAGE_FRENCH
_G.kLanguageItalian = cc.LANGUAGE_ITALIAN
_G.kLanguageGerman = cc.LANGUAGE_GERMAN
_G.kLanguageSpanish = cc.LANGUAGE_SPANISH
_G.kLanguageRussian = cc.LANGUAGE_RUSSIAN
_G.kLanguageKorean = cc.LANGUAGE_KOREAN
_G.kLanguageJapanese = cc.LANGUAGE_JAPANESE
_G.kLanguageHungarian = cc.LANGUAGE_HUNGARIAN
_G.kLanguagePortuguese = cc.LANGUAGE_PORTUGUESE
_G.kLanguageArabic = cc.LANGUAGE_ARABIC
_G.kTargetWindows = cc.PLATFORM_OS_WINDOWS
_G.kTargetLinux = cc.PLATFORM_OS_LINUX
_G.kTargetMacOS = cc.PLATFORM_OS_MAC
_G.kTargetAndroid = cc.PLATFORM_OS_ANDROID
_G.kTargetIphone = cc.PLATFORM_OS_IPHONE
cc.TEXTURE_PIXELFORMAT_DEFAULT = cc.TEXTURE_PF_RGBA8

View File

@ -1,307 +0,0 @@
if nil == ccs then
return
end
-- This is the DeprecatedExtensionClass
DeprecatedExtensionClass = {} or DeprecatedExtensionClass
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--CCArmature class will be Deprecated,begin
function DeprecatedExtensionClass.CCArmature()
deprecatedTip("CCArmature","ccs.Armature")
return ccs.Armature
end
_G["CCArmature"] = DeprecatedExtensionClass.CCArmature()
--CCArmature class will be Deprecated,end
--CCArmatureAnimation class will be Deprecated,begin
function DeprecatedExtensionClass.CCArmatureAnimation()
deprecatedTip("CCArmatureAnimation","ccs.ArmatureAnimation")
return ccs.ArmatureAnimation
end
_G["CCArmatureAnimation"] = DeprecatedExtensionClass.CCArmatureAnimation()
--CCArmatureAnimation class will be Deprecated,end
--CCSkin class will be Deprecated,begin
function DeprecatedExtensionClass.CCSkin()
deprecatedTip("CCSkin","ccs.Skin")
return ccs.Skin
end
_G["CCSkin"] = DeprecatedExtensionClass.CCSkin()
--CCSkin class will be Deprecated,end
--CCBone class will be Deprecated,begin
function DeprecatedExtensionClass.CCBone()
deprecatedTip("CCBone","ccs.Bone")
return ccs.Bone
end
_G["CCBone"] = DeprecatedExtensionClass.CCBone()
--CCBone class will be Deprecated,end
--CCArmatureDataManager class will be Deprecated,begin
function DeprecatedExtensionClass.CCArmatureDataManager()
deprecatedTip("CCArmatureDataManager","ccs.ArmatureDataManager")
return ccs.ArmatureDataManager
end
_G["CCArmatureDataManager"] = DeprecatedExtensionClass.CCArmatureDataManager()
--CCArmatureDataManager class will be Deprecated,end
--CCBatchNode class will be Deprecated,begin
function DeprecatedExtensionClass.CCBatchNode()
deprecatedTip("CCBatchNode","ccs.BatchNode")
return ccs.BatchNode
end
_G["CCBatchNode"] = DeprecatedExtensionClass.CCBatchNode()
--CCBatchNode class will be Deprecated,end
--CCTween class will be Deprecated,begin
function DeprecatedExtensionClass.CCTween()
deprecatedTip("CCTween","ccs.Tween")
return ccs.Tween
end
_G["CCTween"] = DeprecatedExtensionClass.CCTween()
--CCTween class will be Deprecated,end
--CCBaseData class will be Deprecated,begin
function DeprecatedExtensionClass.CCBaseData()
deprecatedTip("CCBaseData","ccs.BaseData")
return ccs.BaseData
end
_G["CCBaseData"] = DeprecatedExtensionClass.CCBaseData()
--CCBaseData class will be Deprecated,end
--CCDisplayManager class will be Deprecated,begin
function DeprecatedExtensionClass.CCDisplayManager()
deprecatedTip("CCDisplayManager","ccs.DisplayManager")
return ccs.DisplayManager
end
_G["CCDisplayManager"] = DeprecatedExtensionClass.CCDisplayManager()
--CCDisplayManager class will be Deprecated,end
--UIHelper class will be Deprecated,begin
function DeprecatedExtensionClass.UIHelper()
deprecatedTip("UIHelper","ccs.UIHelper")
return ccs.UIHelper
end
_G["UIHelper"] = DeprecatedExtensionClass.UIHelper()
--UIHelper class will be Deprecated,end
--UILayout class will be Deprecated,begin
function DeprecatedExtensionClass.UILayout()
deprecatedTip("UILayout","ccs.UILayout")
return ccs.UILayout
end
_G["UILayout"] = DeprecatedExtensionClass.UILayout()
--UILayout class will be Deprecated,end
--UIWidget class will be Deprecated,begin
function DeprecatedExtensionClass.UIWidget()
deprecatedTip("UIWidget","ccs.UIWidget")
return ccs.UIWidget
end
_G["UIWidget"] = DeprecatedExtensionClass.UIWidget()
--UIWidget class will be Deprecated,end
--UILayer class will be Deprecated,begin
function DeprecatedExtensionClass.UILayer()
deprecatedTip("UILayer","ccs.UILayer")
return ccs.UILayer
end
_G["UILayer"] = DeprecatedExtensionClass.UILayer()
--UILayer class will be Deprecated,end
--UIButton class will be Deprecated,begin
function DeprecatedExtensionClass.UIButton()
deprecatedTip("UIButton","ccs.UIButton")
return ccs.UIButton
end
_G["UIButton"] = DeprecatedExtensionClass.UIButton()
--UIButton class will be Deprecated,end
--UICheckBox class will be Deprecated,begin
function DeprecatedExtensionClass.UICheckBox()
deprecatedTip("UICheckBox","ccs.UICheckBox")
return ccs.UICheckBox
end
_G["UICheckBox"] = DeprecatedExtensionClass.UICheckBox()
--UICheckBox class will be Deprecated,end
--UIImageView class will be Deprecated,begin
function DeprecatedExtensionClass.UIImageView()
deprecatedTip("UIImageView","ccs.UIImageView")
return ccs.UIImageView
end
_G["UIImageView"] = DeprecatedExtensionClass.UIImageView()
--UIImageView class will be Deprecated,end
--UILabel class will be Deprecated,begin
function DeprecatedExtensionClass.UILabel()
deprecatedTip("UILabel","ccs.UILabel")
return ccs.UILabel
end
_G["UILabel"] = DeprecatedExtensionClass.UILabel()
--UILabel class will be Deprecated,end
--UILabelAtlas class will be Deprecated,begin
function DeprecatedExtensionClass.UILabelAtlas()
deprecatedTip("UILabelAtlas","ccs.UILabelAtlas")
return ccs.UILabelAtlas
end
_G["UILabelAtlas"] = DeprecatedExtensionClass.UILabelAtlas()
--UILabelAtlas class will be Deprecated,end
--UILabelBMFont class will be Deprecated,begin
function DeprecatedExtensionClass.UILabelBMFont()
deprecatedTip("UILabelBMFont","ccs.UILabelBMFont")
return ccs.UILabelBMFont
end
_G["UILabelBMFont"] = DeprecatedExtensionClass.UILabelBMFont()
--UILabelBMFont class will be Deprecated,end
--UILoadingBar class will be Deprecated,begin
function DeprecatedExtensionClass.UILoadingBar()
deprecatedTip("UILoadingBar","ccs.UILoadingBar")
return ccs.UILoadingBar
end
_G["UILoadingBar"] = DeprecatedExtensionClass.UILoadingBar()
--UILoadingBar class will be Deprecated,end
--UISlider class will be Deprecated,begin
function DeprecatedExtensionClass.UISlider()
deprecatedTip("UISlider","ccs.UISlider")
return ccs.UISlider
end
_G["UISlider"] = DeprecatedExtensionClass.UISlider()
--UISlider class will be Deprecated,end
--UITextField class will be Deprecated,begin
function DeprecatedExtensionClass.UITextField()
deprecatedTip("UITextField","ccs.UITextField")
return ccs.UITextField
end
_G["UITextField"] = DeprecatedExtensionClass.UITextField()
--UITextField class will be Deprecated,end
--UIScrollView class will be Deprecated,begin
function DeprecatedExtensionClass.UIScrollView()
deprecatedTip("UIScrollView","ccs.UIScrollView")
return ccs.UIScrollView
end
_G["UIScrollView"] = DeprecatedExtensionClass.UIScrollView()
--UIScrollView class will be Deprecated,end
--UIPageView class will be Deprecated,begin
function DeprecatedExtensionClass.UIPageView()
deprecatedTip("UIPageView","ccs.UIPageView")
return ccs.UIPageView
end
_G["UIPageView"] = DeprecatedExtensionClass.UIPageView()
--UIPageView class will be Deprecated,end
--UIListView class will be Deprecated,begin
function DeprecatedExtensionClass.UIListView()
deprecatedTip("UIListView","ccs.UIListView")
return ccs.UIListView
end
_G["UIListView"] = DeprecatedExtensionClass.UIListView()
--UIListView class will be Deprecated,end
--UILayoutParameter class will be Deprecated,begin
function DeprecatedExtensionClass.UILayoutParameter()
deprecatedTip("UILayoutParameter","ccs.UILayoutParameter")
return ccs.UILayoutParameter
end
_G["UILayoutParameter"] = DeprecatedExtensionClass.UILayoutParameter()
--UILayoutParameter class will be Deprecated,end
--UILinearLayoutParameter class will be Deprecated,begin
function DeprecatedExtensionClass.UILinearLayoutParameter()
deprecatedTip("UILinearLayoutParameter","ccs.UILinearLayoutParameter")
return ccs.UILinearLayoutParameter
end
_G["UILinearLayoutParameter"] = DeprecatedExtensionClass.UILinearLayoutParameter()
--UILinearLayoutParameter class will be Deprecated,end
--UIRelativeLayoutParameter class will be Deprecated,begin
function DeprecatedExtensionClass.UIRelativeLayoutParameter()
deprecatedTip("UIRelativeLayoutParameter","ccs.UIRelativeLayoutParameter")
return ccs.UIRelativeLayoutParameter
end
_G["UIRelativeLayoutParameter"] = DeprecatedExtensionClass.UIRelativeLayoutParameter()
--UIRelativeLayoutParameter class will be Deprecated,end
--CCComController class will be Deprecated,begin
function DeprecatedExtensionClass.CCComController()
deprecatedTip("CCComController","ccs.ComController")
return ccs.CCComController
end
_G["CCComController"] = DeprecatedExtensionClass.CCComController()
--CCComController class will be Deprecated,end
--CCComAudio class will be Deprecated,begin
function DeprecatedExtensionClass.CCComAudio()
deprecatedTip("CCComAudio","ccs.ComAudio")
return ccs.ComAudio
end
_G["CCComAudio"] = DeprecatedExtensionClass.CCComAudio()
--CCComAudio class will be Deprecated,end
--CCComAttribute class will be Deprecated,begin
function DeprecatedExtensionClass.CCComAttribute()
deprecatedTip("CCComAttribute","ccs.ComAttribute")
return ccs.ComAttribute
end
_G["CCComAttribute"] = DeprecatedExtensionClass.CCComAttribute()
--CCComAttribute class will be Deprecated,end
--CCComRender class will be Deprecated,begin
function DeprecatedExtensionClass.CCComRender()
deprecatedTip("CCComRender","ccs.ComRender")
return ccs.ComRender
end
_G["CCComRender"] = DeprecatedExtensionClass.CCComRender()
--CCComRender class will be Deprecated,end
--ActionManager class will be Deprecated,begin
function DeprecatedExtensionClass.ActionManager()
deprecatedTip("ActionManager","ccs.ActionManagerEx")
return ccs.ActionManagerEx
end
_G["ActionManager"] = DeprecatedExtensionClass.ActionManager()
--CCComRender class will be Deprecated,end
--SceneReader class will be Deprecated,begin
function DeprecatedExtensionClass.SceneReader()
deprecatedTip("SceneReader","ccs.SceneReader")
return ccs.SceneReader
end
_G["SceneReader"] = DeprecatedExtensionClass.SceneReader()
--SceneReader class will be Deprecated,end
--GUIReader class will be Deprecated,begin
function DeprecatedExtensionClass.GUIReader()
deprecatedTip("GUIReader","ccs.GUIReader")
return ccs.GUIReader
end
_G["GUIReader"] = DeprecatedExtensionClass.GUIReader()
--GUIReader class will be Deprecated,end
--UIRootWidget class will be Deprecated,begin
function DeprecatedExtensionClass.UIRootWidget()
deprecatedTip("UIRootWidget","ccs.UIRootWidget")
return ccs.UIRootWidget
end
_G["UIRootWidget"] = DeprecatedExtensionClass.UIRootWidget()
--UIRootWidget class will be Deprecated,end
--ActionObject class will be Deprecated,begin
function DeprecatedExtensionClass.ActionObject()
deprecatedTip("ActionObject","ccs.ActionObject")
return ccs.ActionObject
end
_G["ActionObject"] = DeprecatedExtensionClass.ActionObject()
--ActionObject class will be Deprecated,end

View File

@ -1,81 +0,0 @@
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**********")
end
--functions of GUIReader will be deprecated begin
local GUIReaderDeprecated = { }
function GUIReaderDeprecated.shareReader()
deprecatedTip("GUIReader:shareReader","ccs.GUIReader:getInstance")
return ccs.GUIReader:getInstance()
end
GUIReader.shareReader = GUIReaderDeprecated.shareReader
function GUIReaderDeprecated.purgeGUIReader()
deprecatedTip("GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
return ccs.GUIReader:destroyInstance()
end
GUIReader.purgeGUIReader = GUIReaderDeprecated.purgeGUIReader
--functions of GUIReader will be deprecated end
--functions of SceneReader will be deprecated begin
local SceneReaderDeprecated = { }
function SceneReaderDeprecated.sharedSceneReader()
deprecatedTip("SceneReader:sharedSceneReader","ccs.SceneReader:getInstance")
return ccs.SceneReader:getInstance()
end
SceneReader.sharedSceneReader = SceneReaderDeprecated.sharedSceneReader
function SceneReaderDeprecated.purgeSceneReader(self)
deprecatedTip("SceneReader:purgeSceneReader","ccs.SceneReader:destroyInstance")
return self:destroyInstance()
end
SceneReader.purgeSceneReader = SceneReaderDeprecated.purgeSceneReader
--functions of SceneReader will be deprecated end
--functions of ccs.GUIReader will be deprecated begin
local CCSGUIReaderDeprecated = { }
function CCSGUIReaderDeprecated.purgeGUIReader()
deprecatedTip("ccs.GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
return ccs.GUIReader:destroyInstance()
end
ccs.GUIReader.purgeGUIReader = CCSGUIReaderDeprecated.purgeGUIReader
--functions of ccs.GUIReader will be deprecated end
--functions of ccs.ActionManagerEx will be deprecated begin
local CCSActionManagerExDeprecated = { }
function CCSActionManagerExDeprecated.destroyActionManager()
deprecatedTip("ccs.ActionManagerEx:destroyActionManager","ccs.ActionManagerEx:destroyInstance")
return ccs.ActionManagerEx:destroyInstance()
end
ccs.ActionManagerEx.destroyActionManager = CCSActionManagerExDeprecated.destroyActionManager
--functions of ccs.ActionManagerEx will be deprecated end
--functions of ccs.SceneReader will be deprecated begin
local CCSSceneReaderDeprecated = { }
function CCSSceneReaderDeprecated.destroySceneReader(self)
deprecatedTip("ccs.SceneReader:destroySceneReader","ccs.SceneReader:destroyInstance")
return self:destroyInstance()
end
ccs.SceneReader.destroySceneReader = CCSSceneReaderDeprecated.destroySceneReader
--functions of ccs.SceneReader will be deprecated end
--functions of CCArmatureDataManager will be deprecated begin
local CCArmatureDataManagerDeprecated = { }
function CCArmatureDataManagerDeprecated.sharedArmatureDataManager()
deprecatedTip("CCArmatureDataManager:sharedArmatureDataManager","ccs.ArmatureDataManager:getInstance")
return ccs.ArmatureDataManager:getInstance()
end
CCArmatureDataManager.sharedArmatureDataManager = CCArmatureDataManagerDeprecated.sharedArmatureDataManager
function CCArmatureDataManagerDeprecated.purge()
deprecatedTip("CCArmatureDataManager:purge","ccs.ArmatureDataManager:destoryInstance")
return ccs.ArmatureDataManager:destoryInstance()
end
CCArmatureDataManager.purge = CCArmatureDataManagerDeprecated.purge
--functions of CCArmatureDataManager will be deprecated end

View File

@ -1,134 +0,0 @@
if nil == cc.Control then
return
end
-- This is the DeprecatedExtensionClass
DeprecatedExtensionClass = {} or DeprecatedExtensionClass
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--CCControl class will be Deprecated,begin
function DeprecatedExtensionClass.CCControl()
deprecatedTip("CCControl","cc.Control")
return cc.Control
end
_G["CCControl"] = DeprecatedExtensionClass.CCControl()
--CCControl class will be Deprecated,end
--CCScrollView class will be Deprecated,begin
function DeprecatedExtensionClass.CCScrollView()
deprecatedTip("CCScrollView","cc.ScrollView")
return cc.ScrollView
end
_G["CCScrollView"] = DeprecatedExtensionClass.CCScrollView()
--CCScrollView class will be Deprecated,end
--CCTableView class will be Deprecated,begin
function DeprecatedExtensionClass.CCTableView()
deprecatedTip("CCTableView","cc.TableView")
return cc.TableView
end
_G["CCTableView"] = DeprecatedExtensionClass.CCTableView()
--CCTableView class will be Deprecated,end
--CCControlPotentiometer class will be Deprecated,begin
function DeprecatedExtensionClass.CCControlPotentiometer()
deprecatedTip("CCControlPotentiometer","cc.ControlPotentiometer")
return cc.ControlPotentiometer
end
_G["CCControlPotentiometer"] = DeprecatedExtensionClass.CCControlPotentiometer()
--CCControlPotentiometer class will be Deprecated,end
--CCControlStepper class will be Deprecated,begin
function DeprecatedExtensionClass.CCControlStepper()
deprecatedTip("CCControlStepper","cc.ControlStepper")
return cc.ControlStepper
end
_G["CCControlStepper"] = DeprecatedExtensionClass.CCControlStepper()
--CCControlStepper class will be Deprecated,end
--CCControlHuePicker class will be Deprecated,begin
function DeprecatedExtensionClass.CCControlHuePicker()
deprecatedTip("CCControlHuePicker","cc.ControlHuePicker")
return cc.ControlHuePicker
end
_G["CCControlHuePicker"] = DeprecatedExtensionClass.CCControlHuePicker()
--CCControlHuePicker class will be Deprecated,end
--CCControlSlider class will be Deprecated,begin
function DeprecatedExtensionClass.CCControlSlider()
deprecatedTip("CCControlSlider","cc.ControlSlider")
return cc.ControlSlider
end
_G["CCControlSlider"] = DeprecatedExtensionClass.CCControlSlider()
--CCControlSlider class will be Deprecated,end
--CCControlSaturationBrightnessPicker class will be Deprecated,begin
function DeprecatedExtensionClass.CCControlSaturationBrightnessPicker()
deprecatedTip("CCControlSaturationBrightnessPicker","cc.ControlSaturationBrightnessPicker")
return cc.ControlSaturationBrightnessPicker
end
_G["CCControlSaturationBrightnessPicker"] = DeprecatedExtensionClass.CCControlSaturationBrightnessPicker()
--CCControlSaturationBrightnessPicker class will be Deprecated,end
--CCControlSwitch class will be Deprecated,begin
function DeprecatedExtensionClass.CCControlSwitch()
deprecatedTip("CCControlSwitch","cc.ControlSwitch")
return cc.ControlSwitch
end
_G["CCControlSwitch"] = DeprecatedExtensionClass.CCControlSwitch()
--CCControlSwitch class will be Deprecated,end
--CCControlButton class will be Deprecated,begin
function DeprecatedExtensionClass.CCControlButton()
deprecatedTip("CCControlButton","cc.ControlButton")
return cc.ControlButton
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")
return ccui.Scale9Sprite
end
_G["CCScale9Sprite"] = DeprecatedExtensionClass.CCScale9Sprite()
function DeprecatedExtensionClass.UIScale9Sprite()
deprecatedTip("cc.Scale9Sprite","ccui.Scale9Sprite")
return ccui.Scale9Sprite
end
_G["cc"]["Scale9Sprite"] = DeprecatedExtensionClass.UIScale9Sprite()
--CCScale9Sprite class will be Deprecated,end

View File

@ -1,26 +0,0 @@
if nil == cc.Control then
return
end
_G.kCCControlStepperPartMinus = cc.CONTROL_STEPPER_PART_MINUS
_G.kCCControlStepperPartPlus = cc.CONTROL_STEPPER_PART_PLUS
_G.kCCControlStepperPartNone = cc.CONTROL_STEPPER_PART_NONE
_G.CCControlEventTouchDown = cc.CONTROL_EVENTTYPE_TOUCH_DOWN
_G.CCControlEventTouchDragInside = cc.CONTROL_EVENTTYPE_DRAG_INSIDE
_G.CCControlEventTouchDragOutside = cc.CONTROL_EVENTTYPE_DRAG_OUTSIDE
_G.CCControlEventTouchDragEnter = cc.CONTROL_EVENTTYPE_DRAG_ENTER
_G.CCControlEventTouchDragExit = cc.CONTROL_EVENTTYPE_DRAG_EXIT
_G.CCControlEventTouchUpInside = cc.CONTROL_EVENTTYPE_TOUCH_UP_INSIDE
_G.CCControlEventTouchUpOutside = cc.CONTROL_EVENTTYPE_TOUCH_UP_OUTSIDE
_G.CCControlEventTouchCancel = cc.CONTROL_EVENTTYPE_TOUCH_CANCEL
_G.CCControlEventValueChanged = cc.CONTROL_EVENTTYPE_VALUE_CHANGED
_G.CCControlStateNormal = cc.CONTROL_STATE_NORMAL
_G.CCControlStateHighlighted = cc.CONTROL_STATE_HIGH_LIGHTED
_G.CCControlStateDisabled = cc.CONTROL_STATE_DISABLED
_G.CCControlStateSelected = cc.CONTROL_STATE_SELECTED
_G.kCCScrollViewDirectionHorizontal = cc.SCROLLVIEW_DIRECTION_HORIZONTAL
_G.kCCScrollViewDirectionVertical = cc.SCROLLVIEW_DIRECTION_VERTICAL
_G.kCCTableViewFillTopDown = cc.TABLEVIEW_FILL_TOPDOWN
_G.kCCTableViewFillBottomUp = cc.TABLEVIEW_FILL_BOTTOMUP

View File

@ -1,32 +0,0 @@
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**********")
end
--functions of CCControl will be deprecated end
local CCControlDeprecated = { }
function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent)
deprecatedTip("addHandleOfControlEvent","registerControlEventHandler")
print("come in addHandleOfControlEvent")
self:registerControlEventHandler(func,controlEvent)
end
CCControl.addHandleOfControlEvent = CCControlDeprecated.addHandleOfControlEvent
--functions of CCControl will be deprecated end
--Enums of CCTableView will be deprecated begin
CCTableView.kTableViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
CCTableView.kTableViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
CCTableView.kTableCellTouched = cc.TABLECELL_TOUCHED
CCTableView.kTableCellSizeForIndex = cc.TABLECELL_SIZE_FOR_INDEX
CCTableView.kTableCellSizeAtIndex = cc.TABLECELL_SIZE_AT_INDEX
CCTableView.kNumberOfCellsInTableView = cc.NUMBER_OF_CELLS_IN_TABLEVIEW
--Enums of CCTableView will be deprecated end
--Enums of CCScrollView will be deprecated begin
CCScrollView.kScrollViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
CCScrollView.kScrollViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
--Enums of CCScrollView will be deprecated end

View File

@ -43,9 +43,9 @@ ccexp = axexp
ccui = axui
ccb = axb
require "axmol.cocos2d.Cocos2d"
require "axmol.cocos2d.Cocos2dConstants"
require "axmol.cocos2d.functions"
require "axmol.core.Axmol"
require "axmol.core.Constants"
require "axmol.core.functions"
__G__TRACKBACK__ = function(msg)
local msg = debug.traceback(msg, 3)
@ -71,37 +71,8 @@ if nil ~= sp then
require "axmol.spine.SpineConstants"
end
-- require "axmol.cocos2d.deprecated"
-- Lua extensions
require "axmol.cocos2d.bitExtend"
-- CCLuaEngine
-- require "axmol.cocos2d.DeprecatedCocos2dClass"
-- require "axmol.cocos2d.DeprecatedCocos2dEnum"
-- require "axmol.cocos2d.DeprecatedCocos2dFunc"
-- register_cocostudio_module
-- if nil ~= ccs then
-- require "axmol.cocostudio.DeprecatedCocoStudioClass"
-- require "axmol.cocostudio.DeprecatedCocoStudioFunc"
-- end
-- register_extension_module
-- require "axmol.extension.DeprecatedExtensionClass"
-- require "axmol.extension.DeprecatedExtensionEnum"
-- require "axmol.extension.DeprecatedExtensionFunc"
-- register_network_module
-- require "axmol.network.DeprecatedNetworkClass"
-- require "axmol.network.DeprecatedNetworkEnum"
-- require "axmol.network.DeprecatedNetworkFunc"
-- register_ui_module
-- if nil ~= ccui then
-- require "axmol.ui.DeprecatedUIEnum"
-- require "axmol.ui.DeprecatedUIFunc"
-- end
require "axmol.core.bitExtend"
-- physics3d
require "axmol.physics3d.physics3d-constants"

View File

@ -1,19 +0,0 @@
if nil == cc.XMLHttpRequest then
return
end
-- This is the DeprecatedNetworkClass
DeprecatedNetworkClass = {} or DeprecatedNetworkClass
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--WebSocket class will be Deprecated,begin
function DeprecatedNetworkClass.WebSocket()
deprecatedTip("WebSocket","cc.WebSocket")
return cc.WebSocket
end
_G["WebSocket"] = DeprecatedNetworkClass.WebSocket()
--WebSocket class will be Deprecated,end

View File

@ -1,13 +0,0 @@
if nil == cc.XMLHttpRequest then
return
end
_G.kWebSocketScriptHandlerOpen = cc.WEBSOCKET_OPEN
_G.kWebSocketScriptHandlerMessage = cc.WEBSOCKET_MESSAGE
_G.kWebSocketScriptHandlerClose = cc.WEBSOCKET_CLOSE
_G.kWebSocketScriptHandlerError = cc.WEBSOCKET_ERROR
_G.kStateConnecting = cc.WEBSOCKET_STATE_CONNECTING
_G.kStateOpen = cc.WEBSOCKET_STATE_OPEN
_G.kStateClosing = cc.WEBSOCKET_STATE_CLOSING
_G.kStateClosed = cc.WEBSOCKET_STATE_CLOSED

View File

@ -1,29 +0,0 @@
local unpack = table.unpack
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**********")
end
--functions of WebSocket will be deprecated begin
local targetPlatform = CCApplication:getInstance():getTargetPlatform()
if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTargetAndroid == targetPlatform) or (kTargetWindows == targetPlatform) then
local WebSocketDeprecated = { }
function WebSocketDeprecated.sendTextMsg(self, string)
deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString")
return self:sendString(string)
end
WebSocket.sendTextMsg = WebSocketDeprecated.sendTextMsg
function WebSocketDeprecated.sendBinaryMsg(self, table,tablesize)
deprecatedTip("WebSocket:sendBinaryMsg","WebSocket:sendString")
string.char(unpack(table))
return self:sendString(string.char(unpack(table)))
end
WebSocket.sendBinaryMsg = WebSocketDeprecated.sendBinaryMsg
end
--functions of WebSocket will be deprecated end