Skip to content
Snippets Groups Projects
Unverified Commit d288cd1e authored by carsakiller's avatar carsakiller
Browse files

refactor: replace Cocos4.0 with LuaCATS submodule

parent 1536fa32
No related branches found
No related tags found
No related merge requests found
Showing
with 4 additions and 996 deletions
......@@ -28,3 +28,6 @@
[submodule "meta/3rd/busted"]
path = meta/3rd/busted
url = https://github.com/LuaCATS/busted.git
[submodule "meta/3rd/Cocos4.0"]
path = meta/3rd/Cocos4.0
url = https://github.com/LuaCATS/cocos4.0.git
Subproject commit c0b2259e0d367561fd4563ae114b029b4dfe3a8f
{
"name": "Cocos",
"files": ["cocos"],
"settings": {
"Lua.runtime.version": "LuaJIT"
}
}
---@meta
---@class cc.Action :cc.Ref
local Action={ }
cc.Action=Action
---* Called before the action start. It will also set the target. <br>
---* param target A certain target.
---@param target cc.Node
---@return self
function Action:startWithTarget (target) end
---* Set the original target, since target can be nil.<br>
---* Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.<br>
---* The target is 'assigned', it is not 'retained'.<br>
---* since v0.8.2<br>
---* param originalTarget Is 'assigned', it is not 'retained'.
---@param originalTarget cc.Node
---@return self
function Action:setOriginalTarget (originalTarget) end
---* Returns a clone of action.<br>
---* return A clone action.
---@return self
function Action:clone () end
---* Return a original Target. <br>
---* return A original Target.
---@return cc.Node
function Action:getOriginalTarget () end
---* Called after the action has finished. It will set the 'target' to nil.<br>
---* IMPORTANT: You should never call "Action::stop()" manually. Instead, use: "target->stopAction(action);".
---@return self
function Action:stop () end
---* Called once per frame. time a value between 0 and 1.<br>
---* For example:<br>
---* - 0 Means that the action just started.<br>
---* - 0.5 Means that the action is in the middle.<br>
---* - 1 Means that the action is over.<br>
---* param time A value between 0 and 1.
---@param time float
---@return self
function Action:update (time) end
---* Return certain target.<br>
---* return A certain target.
---@return cc.Node
function Action:getTarget () end
---* Returns a flag field that is used to group the actions easily.<br>
---* return A tag.
---@return unsigned_int
function Action:getFlags () end
---* Called every frame with it's delta time, dt in seconds. DON'T override unless you know what you are doing. <br>
---* param dt In seconds.
---@param dt float
---@return self
function Action:step (dt) end
---* Changes the tag that is used to identify the action easily. <br>
---* param tag Used to identify the action easily.
---@param tag int
---@return self
function Action:setTag (tag) end
---* Changes the flag field that is used to group the actions easily.<br>
---* param flags Used to group the actions easily.
---@param flags unsigned_int
---@return self
function Action:setFlags (flags) end
---* Returns a tag that is used to identify the action easily. <br>
---* return A tag.
---@return int
function Action:getTag () end
---* The action will modify the target properties. <br>
---* param target A certain target.
---@param target cc.Node
---@return self
function Action:setTarget (target) end
---* Return true if the action has finished. <br>
---* return Is true if the action has finished.
---@return boolean
function Action:isDone () end
---* Returns a new action that performs the exact reverse of the action. <br>
---* return A new action that performs the exact reverse of the action.<br>
---* js NA
---@return self
function Action:reverse () end
\ No newline at end of file
---@meta
---@class cc.ActionCamera :cc.ActionInterval
local ActionCamera={ }
cc.ActionCamera=ActionCamera
---@overload fun(float:float,float:float,float:float):self
---@overload fun(float0:vec3_table):self
---@param x float
---@param y float
---@param z float
---@return self
function ActionCamera:setEye (x,y,z) end
---*
---@return vec3_table
function ActionCamera:getEye () end
---*
---@param up vec3_table
---@return self
function ActionCamera:setUp (up) end
---*
---@return vec3_table
function ActionCamera:getCenter () end
---*
---@param center vec3_table
---@return self
function ActionCamera:setCenter (center) end
---*
---@return vec3_table
function ActionCamera:getUp () end
---*
---@param target cc.Node
---@return self
function ActionCamera:startWithTarget (target) end
---*
---@return self
function ActionCamera:clone () end
---*
---@return self
function ActionCamera:reverse () end
---* js ctor<br>
---* lua new
---@return self
function ActionCamera:ActionCamera () end
\ No newline at end of file
---@meta
---@class cc.ActionEase :cc.ActionInterval
local ActionEase={ }
cc.ActionEase=ActionEase
---* brief Initializes the action.<br>
---* return Return true when the initialization success, otherwise return false.
---@param action cc.ActionInterval
---@return boolean
function ActionEase:initWithAction (action) end
---* brief Get the pointer of the inner action.<br>
---* return The pointer of the inner action.
---@return cc.ActionInterval
function ActionEase:getInnerAction () end
---*
---@param target cc.Node
---@return self
function ActionEase:startWithTarget (target) end
---*
---@return self
function ActionEase:stop () end
---*
---@param time float
---@return self
function ActionEase:update (time) end
\ No newline at end of file
---@meta
---@class cc.ActionFloat :cc.ActionInterval
local ActionFloat={ }
cc.ActionFloat=ActionFloat
---*
---@param duration float
---@param from float
---@param to float
---@param callback function
---@return boolean
function ActionFloat:initWithDuration (duration,from,to,callback) end
---* Creates FloatAction with specified duration, from value, to value and callback to report back<br>
---* results<br>
---* param duration of the action<br>
---* param from value to start from<br>
---* param to value to be at the end of the action<br>
---* param callback to report back result<br>
---* return An autoreleased ActionFloat object
---@param duration float
---@param from float
---@param to float
---@param callback function
---@return self
function ActionFloat:create (duration,from,to,callback) end
---* Overridden ActionInterval methods
---@param target cc.Node
---@return self
function ActionFloat:startWithTarget (target) end
---*
---@return self
function ActionFloat:clone () end
---*
---@param delta float
---@return self
function ActionFloat:update (delta) end
---*
---@return self
function ActionFloat:reverse () end
---*
---@return self
function ActionFloat:ActionFloat () end
\ No newline at end of file
---@meta
---@class cc.ActionInstant :cc.FiniteTimeAction
local ActionInstant={ }
cc.ActionInstant=ActionInstant
---*
---@param target cc.Node
---@return self
function ActionInstant:startWithTarget (target) end
---*
---@return self
function ActionInstant:reverse () end
---*
---@return self
function ActionInstant:clone () end
---* param time In seconds.
---@param time float
---@return self
function ActionInstant:update (time) end
---* param dt In seconds.
---@param dt float
---@return self
function ActionInstant:step (dt) end
---*
---@return boolean
function ActionInstant:isDone () end
\ No newline at end of file
---@meta
---@class cc.ActionInterval :cc.FiniteTimeAction
local ActionInterval={ }
cc.ActionInterval=ActionInterval
---* Gets the amplitude rate, extension in GridAction<br>
---* return The amplitude rate.
---@return float
function ActionInterval:getAmplitudeRate () end
---* initializes the action
---@param d float
---@return boolean
function ActionInterval:initWithDuration (d) end
---* Sets the amplitude rate, extension in GridAction<br>
---* param amp The amplitude rate.
---@param amp float
---@return self
function ActionInterval:setAmplitudeRate (amp) end
---* How many seconds had elapsed since the actions started to run.<br>
---* return The seconds had elapsed since the actions started to run.
---@return float
function ActionInterval:getElapsed () end
---*
---@param target cc.Node
---@return self
function ActionInterval:startWithTarget (target) end
---* param dt in seconds
---@param dt float
---@return self
function ActionInterval:step (dt) end
---*
---@return self
function ActionInterval:clone () end
---*
---@return self
function ActionInterval:reverse () end
---*
---@return boolean
function ActionInterval:isDone () end
\ No newline at end of file
---@meta
---@class cc.ActionManager :cc.Ref
local ActionManager={ }
cc.ActionManager=ActionManager
---* Gets an action given its tag an a target.<br>
---* param tag The action's tag.<br>
---* param target A certain target.<br>
---* return The Action the with the given tag.
---@param tag int
---@param target cc.Node
---@return cc.Action
function ActionManager:getActionByTag (tag,target) end
---* Removes an action given its tag and the target.<br>
---* param tag The action's tag.<br>
---* param target A certain target.
---@param tag int
---@param target cc.Node
---@return self
function ActionManager:removeActionByTag (tag,target) end
---* Removes all actions matching at least one bit in flags and the target.<br>
---* param flags The flag field to match the actions' flags based on bitwise AND.<br>
---* param target A certain target.<br>
---* js NA
---@param flags unsigned_int
---@param target cc.Node
---@return self
function ActionManager:removeActionsByFlags (flags,target) end
---* Removes all actions from all the targets.
---@return self
function ActionManager:removeAllActions () end
---* Adds an action with a target. <br>
---* If the target is already present, then the action will be added to the existing target.<br>
---* If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.<br>
---* When the target is paused, the queued actions won't be 'ticked'.<br>
---* param action A certain action.<br>
---* param target The target which need to be added an action.<br>
---* param paused Is the target paused or not.
---@param action cc.Action
---@param target cc.Node
---@param paused boolean
---@return self
function ActionManager:addAction (action,target,paused) end
---* Resumes the target. All queued actions will be resumed.<br>
---* param target A certain target.
---@param target cc.Node
---@return self
function ActionManager:resumeTarget (target) end
---* Returns the numbers of actions that are running in all targets.<br>
---* return The numbers of actions that are running in all target.<br>
---* js NA
---@return int
function ActionManager:getNumberOfRunningActions () end
---* Pauses the target: all running actions and newly added actions will be paused.<br>
---* param target A certain target.
---@param target cc.Node
---@return self
function ActionManager:pauseTarget (target) end
---* Returns the numbers of actions that are running in a certain target. <br>
---* Composable actions are counted as 1 action. Example:<br>
---* - If you are running 1 Sequence of 7 actions, it will return 1.<br>
---* - If you are running 7 Sequences of 2 actions, it will return 7.<br>
---* param target A certain target.<br>
---* return The numbers of actions that are running in a certain target.<br>
---* js NA
---@param target cc.Node
---@return int
function ActionManager:getNumberOfRunningActionsInTarget (target) end
---* Removes all actions from a certain target.<br>
---* All the actions that belongs to the target will be removed.<br>
---* param target A certain target.
---@param target cc.Node
---@return self
function ActionManager:removeAllActionsFromTarget (target) end
---* Resume a set of targets (convenience function to reverse a pauseAllRunningActions call).<br>
---* param targetsToResume A set of targets need to be resumed.
---@param targetsToResume array_table
---@return self
function ActionManager:resumeTargets (targetsToResume) end
---* Removes an action given an action reference.<br>
---* param action A certain target.
---@param action cc.Action
---@return self
function ActionManager:removeAction (action) end
---* Pauses all running actions, returning a list of targets whose actions were paused.<br>
---* return A list of targets whose actions were paused.
---@return array_table
function ActionManager:pauseAllRunningActions () end
---* Main loop of ActionManager.<br>
---* param dt In seconds.
---@param dt float
---@return self
function ActionManager:update (dt) end
---* Removes all actions given its tag and the target.<br>
---* param tag The actions' tag.<br>
---* param target A certain target.<br>
---* js NA
---@param tag int
---@param target cc.Node
---@return self
function ActionManager:removeAllActionsByTag (tag,target) end
---* Returns the numbers of actions that are running in a<br>
---* certain target with a specific tag.<br>
---* Like getNumberOfRunningActionsInTarget Composable actions<br>
---* are counted as 1 action. Example:<br>
---* - If you are running 1 Sequence of 7 actions, it will return 1.<br>
---* - If you are running 7 Sequences of 2 actions, it will return 7.<br>
---* param target A certain target.<br>
---* param tag Tag that will be searched.<br>
---* return The numbers of actions that are running in a certain target<br>
---* with a specific tag.<br>
---* see getNumberOfRunningActionsInTarget<br>
---* js NA
---@param target cc.Node
---@param tag int
---@return unsigned_int
function ActionManager:getNumberOfRunningActionsInTargetByTag (target,tag) end
---* js ctor
---@return self
function ActionManager:ActionManager () end
\ No newline at end of file
---@meta
---@class cc.ActionTween :cc.ActionInterval
local ActionTween={ }
cc.ActionTween=ActionTween
---* brief Initializes the action with the property name (key), and the from and to parameters.<br>
---* param duration The duration of the ActionTween. It's a value in seconds.<br>
---* param key The key of property which should be updated.<br>
---* param from The value of the specified property when the action begin.<br>
---* param to The value of the specified property when the action end.<br>
---* return If the initialization success, return true; otherwise, return false.
---@param duration float
---@param key string
---@param from float
---@param to float
---@return boolean
function ActionTween:initWithDuration (duration,key,from,to) end
---* brief Create and initializes the action with the property name (key), and the from and to parameters.<br>
---* param duration The duration of the ActionTween. It's a value in seconds.<br>
---* param key The key of property which should be updated.<br>
---* param from The value of the specified property when the action begin.<br>
---* param to The value of the specified property when the action end.<br>
---* return If the creation success, return a pointer of ActionTween; otherwise, return nil.
---@param duration float
---@param key string
---@param from float
---@param to float
---@return self
function ActionTween:create (duration,key,from,to) end
---*
---@param target cc.Node
---@return self
function ActionTween:startWithTarget (target) end
---*
---@return self
function ActionTween:clone () end
---*
---@param dt float
---@return self
function ActionTween:update (dt) end
---*
---@return self
function ActionTween:reverse () end
\ No newline at end of file
---@meta
---@class cc.AmbientLight :cc.BaseLight
local AmbientLight={ }
cc.AmbientLight=AmbientLight
---* Creates a ambient light.<br>
---* param color The light's color.<br>
---* return The new ambient light.
---@param color color3b_table
---@return self
function AmbientLight:create (color) end
---*
---@return int
function AmbientLight:getLightType () end
---*
---@return self
function AmbientLight:AmbientLight () end
\ No newline at end of file
---@meta
---@class cc.Animate :cc.ActionInterval
local Animate={ }
cc.Animate=Animate
---* initializes the action with an Animation and will restore the original frame when the animation is over
---@param animation cc.Animation
---@return boolean
function Animate:initWithAnimation (animation) end
---@overload fun():self
---@overload fun():self
---@return cc.Animation
function Animate:getAnimation () end
---* Gets the index of sprite frame currently displayed.<br>
---* return int the index of sprite frame currently displayed.
---@return int
function Animate:getCurrentFrameIndex () end
---* Sets the Animation object to be animated <br>
---* param animation certain animation.
---@param animation cc.Animation
---@return self
function Animate:setAnimation (animation) end
---* Creates the action with an Animation and will restore the original frame when the animation is over.<br>
---* param animation A certain animation.<br>
---* return An autoreleased Animate object.
---@param animation cc.Animation
---@return self
function Animate:create (animation) end
---*
---@param target cc.Node
---@return self
function Animate:startWithTarget (target) end
---*
---@return self
function Animate:clone () end
---*
---@return self
function Animate:stop () end
---*
---@return self
function Animate:reverse () end
---* param t In seconds.
---@param t float
---@return self
function Animate:update (t) end
---*
---@return self
function Animate:Animate () end
\ No newline at end of file
---@meta
---@class cc.Animate3D :cc.ActionInterval
local Animate3D={ }
cc.Animate3D=Animate3D
---*
---@param keyFrame int
---@param userInfo map_table
---@return self
function Animate3D:setKeyFrameUserInfo (keyFrame,userInfo) end
---* get & set speed, negative speed means playing reverse
---@return float
function Animate3D:getSpeed () end
---* set animate quality
---@param quality int
---@return self
function Animate3D:setQuality (quality) end
---*
---@param weight float
---@return self
function Animate3D:setWeight (weight) end
---*
---@return self
function Animate3D:removeFromMap () end
---*
---@param animation cc.Animation3D
---@param startFrame int
---@param endFrame int
---@param frameRate float
---@return boolean
function Animate3D:initWithFrames (animation,startFrame,endFrame,frameRate) end
---*
---@return float
function Animate3D:getOriginInterval () end
---*
---@param speed float
---@return self
function Animate3D:setSpeed (speed) end
---@overload fun(cc.Animation3D:cc.Animation3D,float:float,float:float):self
---@overload fun(cc.Animation3D:cc.Animation3D):self
---@param animation cc.Animation3D
---@param fromTime float
---@param duration float
---@return boolean
function Animate3D:init (animation,fromTime,duration) end
---* get & set origin interval
---@param interval float
---@return self
function Animate3D:setOriginInterval (interval) end
---* get & set blend weight, weight must positive
---@return float
function Animate3D:getWeight () end
---* get animate quality
---@return int
function Animate3D:getQuality () end
---@overload fun(cc.Animation3D:cc.Animation3D,float:float,float:float):self
---@overload fun(cc.Animation3D:cc.Animation3D):self
---@param animation cc.Animation3D
---@param fromTime float
---@param duration float
---@return self
function Animate3D:create (animation,fromTime,duration) end
---* get animate transition time between 3d animations
---@return float
function Animate3D:getTransitionTime () end
---* create Animate3D by frame section, [startFrame, endFrame)<br>
---* param animation used to generate animate3D<br>
---* param startFrame<br>
---* param endFrame<br>
---* param frameRate default is 30 per second<br>
---* return Animate3D created using animate
---@param animation cc.Animation3D
---@param startFrame int
---@param endFrame int
---@param frameRate float
---@return self
function Animate3D:createWithFrames (animation,startFrame,endFrame,frameRate) end
---* set animate transition time between 3d animations
---@param transTime float
---@return self
function Animate3D:setTransitionTime (transTime) end
---*
---@param target cc.Node
---@return self
function Animate3D:startWithTarget (target) end
---*
---@return self
function Animate3D:reverse () end
---*
---@return self
function Animate3D:clone () end
---*
---@return self
function Animate3D:stop () end
---*
---@param t float
---@return self
function Animate3D:update (t) end
---*
---@param dt float
---@return self
function Animate3D:step (dt) end
---*
---@return self
function Animate3D:Animate3D () end
\ No newline at end of file
---@meta
---@class cc.Animation :cc.Ref
local Animation={ }
cc.Animation=Animation
---* Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... <br>
---* return The times the animation is going to loop.
---@return unsigned_int
function Animation:getLoops () end
---* Adds a SpriteFrame to a Animation.<br>
---* param frame The frame will be added with one "delay unit".
---@param frame cc.SpriteFrame
---@return self
function Animation:addSpriteFrame (frame) end
---* Sets whether to restore the original frame when animation finishes. <br>
---* param restoreOriginalFrame Whether to restore the original frame when animation finishes.
---@param restoreOriginalFrame boolean
---@return self
function Animation:setRestoreOriginalFrame (restoreOriginalFrame) end
---*
---@return self
function Animation:clone () end
---* Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit.<br>
---* return Result of totalDelayUnits * delayPerUnit.
---@return float
function Animation:getDuration () end
---* Initializes a Animation with AnimationFrame.<br>
---* since v2.0
---@param arrayOfAnimationFrameNames array_table
---@param delayPerUnit float
---@param loops unsigned_int
---@return boolean
function Animation:initWithAnimationFrames (arrayOfAnimationFrameNames,delayPerUnit,loops) end
---* Initializes a Animation.
---@return boolean
function Animation:init () end
---* Sets the array of AnimationFrames. <br>
---* param frames The array of AnimationFrames.
---@param frames array_table
---@return self
function Animation:setFrames (frames) end
---* Gets the array of AnimationFrames.<br>
---* return The array of AnimationFrames.
---@return array_table
function Animation:getFrames () end
---* Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... <br>
---* param loops The times the animation is going to loop.
---@param loops unsigned_int
---@return self
function Animation:setLoops (loops) end
---* Sets the delay in seconds of the "delay unit".<br>
---* param delayPerUnit The delay in seconds of the "delay unit".
---@param delayPerUnit float
---@return self
function Animation:setDelayPerUnit (delayPerUnit) end
---* Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it.<br>
---* The frame will be added with one "delay unit".<br>
---* Added to facilitate the migration from v0.8 to v0.9.<br>
---* param filename The path of SpriteFrame.
---@param filename string
---@return self
function Animation:addSpriteFrameWithFile (filename) end
---* Gets the total Delay units of the Animation. <br>
---* return The total Delay units of the Animation.
---@return float
function Animation:getTotalDelayUnits () end
---* Gets the delay in seconds of the "delay unit".<br>
---* return The delay in seconds of the "delay unit".
---@return float
function Animation:getDelayPerUnit () end
---* Initializes a Animation with frames and a delay between frames.<br>
---* since v0.99.5
---@param arrayOfSpriteFrameNames array_table
---@param delay float
---@param loops unsigned_int
---@return boolean
function Animation:initWithSpriteFrames (arrayOfSpriteFrameNames,delay,loops) end
---* Checks whether to restore the original frame when animation finishes. <br>
---* return Restore the original frame when animation finishes.
---@return boolean
function Animation:getRestoreOriginalFrame () end
---* Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it.<br>
---* The frame will be added with one "delay unit".<br>
---* Added to facilitate the migration from v0.8 to v0.9.<br>
---* param pobTexture A frame with a texture.<br>
---* param rect The Texture of rect.
---@param pobTexture cc.Texture2D
---@param rect rect_table
---@return self
function Animation:addSpriteFrameWithTexture (pobTexture,rect) end
---@overload fun(array_table:array_table,float:float,unsigned_int:unsigned_int):self
---@overload fun():self
---@param arrayOfAnimationFrameNames array_table
---@param delayPerUnit float
---@param loops unsigned_int
---@return self
function Animation:create (arrayOfAnimationFrameNames,delayPerUnit,loops) end
---*
---@param arrayOfSpriteFrameNames array_table
---@param delay float
---@param loops unsigned_int
---@return self
function Animation:createWithSpriteFrames (arrayOfSpriteFrameNames,delay,loops) end
---*
---@return self
function Animation:Animation () end
\ No newline at end of file
---@meta
---@class cc.Animation3D :cc.Ref
local Animation3D={ }
cc.Animation3D=Animation3D
---* init Animation3D with file name and animation name
---@param filename string
---@param animationName string
---@return boolean
function Animation3D:initWithFile (filename,animationName) end
---* init Animation3D from bundle data
---@param data cc.Animation3DData
---@return boolean
function Animation3D:init (data) end
---* get duration
---@return float
function Animation3D:getDuration () end
---* read all animation or only the animation with given animationName? animationName == "" read the first.
---@param filename string
---@param animationName string
---@return self
function Animation3D:create (filename,animationName) end
---*
---@return self
function Animation3D:Animation3D () end
\ No newline at end of file
---@meta
---@class cc.AnimationCache :cc.Ref
local AnimationCache={ }
cc.AnimationCache=AnimationCache
---* Returns a Animation that was previously added.<br>
---* If the name is not found it will return nil.<br>
---* You should retain the returned copy if you are going to use it.<br>
---* return A Animation that was previously added. If the name is not found it will return nil.
---@param name string
---@return cc.Animation
function AnimationCache:getAnimation (name) end
---* Adds a Animation with a name.<br>
---* param animation An animation.<br>
---* param name The name of animation.
---@param animation cc.Animation
---@param name string
---@return self
function AnimationCache:addAnimation (animation,name) end
---*
---@return boolean
function AnimationCache:init () end
---* Adds an animation from an NSDictionary.<br>
---* Make sure that the frames were previously loaded in the SpriteFrameCache.<br>
---* param dictionary An NSDictionary.<br>
---* param plist The path of the relative file,it use to find the plist path for load SpriteFrames.<br>
---* since v1.1<br>
---* js NA
---@param dictionary map_table
---@param plist string
---@return self
function AnimationCache:addAnimationsWithDictionary (dictionary,plist) end
---* Deletes a Animation from the cache.<br>
---* param name The name of animation.
---@param name string
---@return self
function AnimationCache:removeAnimation (name) end
---* Adds an animation from a plist file.<br>
---* Make sure that the frames were previously loaded in the SpriteFrameCache.<br>
---* since v1.1<br>
---* js addAnimations<br>
---* lua addAnimations<br>
---* param plist An animation from a plist file.
---@param plist string
---@return self
function AnimationCache:addAnimationsWithFile (plist) end
---* Purges the cache. It releases all the Animation objects and the shared instance.<br>
---* js NA
---@return self
function AnimationCache:destroyInstance () end
---* Returns the shared instance of the Animation cache <br>
---* js NA
---@return self
function AnimationCache:getInstance () end
---* js ctor
---@return self
function AnimationCache:AnimationCache () end
\ No newline at end of file
---@meta
---@class cc.AnimationFrame :cc.Ref
local AnimationFrame={ }
cc.AnimationFrame=AnimationFrame
---* Set the SpriteFrame.<br>
---* param frame A SpriteFrame will be used.
---@param frame cc.SpriteFrame
---@return self
function AnimationFrame:setSpriteFrame (frame) end
---@overload fun():self
---@overload fun():self
---@return map_table
function AnimationFrame:getUserInfo () end
---* Sets the units of time the frame takes.<br>
---* param delayUnits The units of time the frame takes.
---@param delayUnits float
---@return self
function AnimationFrame:setDelayUnits (delayUnits) end
---*
---@return self
function AnimationFrame:clone () end
---* Return a SpriteFrameName to be used.<br>
---* return a SpriteFrameName to be used.
---@return cc.SpriteFrame
function AnimationFrame:getSpriteFrame () end
---* Gets the units of time the frame takes.<br>
---* return The units of time the frame takes.
---@return float
function AnimationFrame:getDelayUnits () end
---* Sets user information.<br>
---* param userInfo A dictionary as UserInfo.
---@param userInfo map_table
---@return self
function AnimationFrame:setUserInfo (userInfo) end
---* initializes the animation frame with a spriteframe, number of delay units and a notification user info
---@param spriteFrame cc.SpriteFrame
---@param delayUnits float
---@param userInfo map_table
---@return boolean
function AnimationFrame:initWithSpriteFrame (spriteFrame,delayUnits,userInfo) end
---* Creates the animation frame with a spriteframe, number of delay units and a notification user info.<br>
---* param spriteFrame The animation frame with a spriteframe.<br>
---* param delayUnits Number of delay units.<br>
---* param userInfo A notification user info.<br>
---* since 3.0
---@param spriteFrame cc.SpriteFrame
---@param delayUnits float
---@param userInfo map_table
---@return self
function AnimationFrame:create (spriteFrame,delayUnits,userInfo) end
---* js ctor
---@return self
function AnimationFrame:AnimationFrame () end
\ No newline at end of file
---@meta
---@class cc.Application
local Application={ }
cc.Application=Application
---* brief Get target platform
---@return int
function Application:getTargetPlatform () end
---* brief Get current language config<br>
---* return Current language config
---@return int
function Application:getCurrentLanguage () end
---* brief Get current language iso 639-1 code<br>
---* return Current language iso 639-1 code
---@return char
function Application:getCurrentLanguageCode () end
---* brief Open url in default browser<br>
---* param String with url to open.<br>
---* return true if the resource located by the URL was successfully opened; otherwise false.
---@param url string
---@return boolean
function Application:openURL (url) end
---* brief Get application version.
---@return string
function Application:getVersion () end
---* brief Callback by Director to limit FPS.<br>
---* param interval The time, expressed in seconds, between current frame and next.
---@param interval float
---@return self
function Application:setAnimationInterval (interval) end
---* brief Get current application instance.<br>
---* return Current application instance pointer.
---@return self
function Application:getInstance () end
\ No newline at end of file
---@meta
---@class cc.AssetsManager :cc.Node
local AssetsManager={ }
cc.AssetsManager=AssetsManager
---*
---@param storagePath char
---@return self
function AssetsManager:setStoragePath (storagePath) end
---*
---@param packageUrl char
---@return self
function AssetsManager:setPackageUrl (packageUrl) end
---*
---@return boolean
function AssetsManager:checkUpdate () end
---*
---@return char
function AssetsManager:getStoragePath () end
---*
---@return self
function AssetsManager:update () end
---* @brief Sets connection time out in seconds
---@param timeout unsigned_int
---@return self
function AssetsManager:setConnectionTimeout (timeout) end
---*
---@param versionFileUrl char
---@return self
function AssetsManager:setVersionFileUrl (versionFileUrl) end
---*
---@return char
function AssetsManager:getPackageUrl () end
---* @brief Gets connection time out in seconds
---@return unsigned_int
function AssetsManager:getConnectionTimeout () end
---*
---@return string
function AssetsManager:getVersion () end
---*
---@return char
function AssetsManager:getVersionFileUrl () end
---*
---@return self
function AssetsManager:deleteVersion () end
---*
---@param packageUrl char
---@param versionFileUrl char
---@param storagePath char
---@param errorCallback function
---@param progressCallback function
---@param successCallback function
---@return self
function AssetsManager:create (packageUrl,versionFileUrl,storagePath,errorCallback,progressCallback,successCallback) end
---*
---@return self
function AssetsManager:AssetsManager () end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment