最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網 會員登陸 & 注冊

object functions

2023-08-31 01:27 作者:是白不是懷特  | 我要投稿

懶得查api復制來的 Graphic Functions makeGraphic(tag:String, width:Int, height:Int, color:String) Initializes the creation of a colored fill texture. tag - The sprite object tag name to be used. width - The width value in pixels of the object. height - The height value in pixels of the object. color - The hex color value of the object. loadGraphic(variable:String, image:String, ?gridX:Int = 0, ?gridY:Int = 0) Changes the sprite texture with a new one. With an option to set the crop size of the sprite object. variable - The sprite object tag name to be used. image - The new image sprite for the sprite object to be used. gridX - An optional parameter, The crop width of the sprite texture; Default value: 0. gridY - An optional parameter, The crop height of the sprite texture; Default value: 0. setBlendMode(obj:String, blend:String) Changes the blend mode of the object. If you want to see more blend modes, click here. (Works similar to how Photoshop does it) obj - The sprite object tag name to be used. blend - The blend mode to be used; Example: add, darken, invert, etc. Animation Functions playAnim(obj:String, name:String, forced:Bool = false, ?reverse:Bool = false, ?startFrame:Int = 0) Plays an existing animation of the sprite object; it can override an animation. If there are two or similar names inside the name parameter; this rule is applied to all name parameters. obj - The sprite object tag name to be used. name - The specified name of the animation to use. forced - Whether will the animation will be force to restart; Default value: false. reverse - An optional parameter, Whether the animation will be played backwards; Default value false. startFrame - An optional parameter, The animation frame in the animation to start from; Default value: 0. addAnimation(obj:String, name:String, frames:Array, framerate:Int = 24, loop:Bool = true) Adds a new animation of the sprite object. obj - The sprite object tag name to be used. name - The specified name of the animation to use. frames - The indices indicating what animation frames to play in what order; Example: {1, 2, 3}. framerate - The speed in frames per second that the animation should play at; Default is: 24. loop - Whether will the animation will loop or just plays once; Default is true. addAnimationByPrefix(obj:String, name:String, prefix:String, framerate:Int = 24, loop:Bool = true) Adds a new animation from the xml file for the sprite object to use. obj - The sprite object tag name to be used. name - The specified name of the animation to use. prefix - The prefix name inside the xml file to be played. framerate - The speed in frames per second that the animation should play at; Default is: 24. loop - Whether will the animation will loop or just plays once; Default is true. addAnimationByIndices(obj:String, name:String, prefix:String, indices:String, framerate:Int = 24) Adds a new animation with the specified indices for the animation frames to play for the sprite object to use. If you want the looped version of this function use addAnimationByIndicesLoop(); all parameters and its use are the same. obj - The sprite object tag name to be used. name - The specified name of the animation to use. prefix - The prefix name inside the xml file to be played. frames - The indices indicating what animation frames to play in what order; Example: 1, 2, 3. framerate - The speed in frames per second that the animation should play at; Default is: 24. addOffset(obj:String, anim:String, x:Float, y:Float) Adds a new offset value on each animation. obj - The sprite object tag name to be used. anim - The specified name of the animation to use. x - The new x offset value of the animation. y - the new y offset value of the animation. loadFrames(variable:String, image:String, spriteType:String = "sparrow") Loads the Lua sprites animation frames. variable The sprite object tag name to be used. image - The image sprite for the sprite to use. spriteType - An optional parameter, The specified sprite type of the Lua sprite could be either a sprite-sheet for sparrow or texture-atlas for tex; Default value: sparrow. Precaching Functions Note: It's highly recommended that you use this function onCreate() callback. These functions are mainly used for avoiding a massive game freeze when an asset first gets used. addCharacterToList(name:String, type:String) Pre-caches the sprite character, this used if you're switching characters. name - The json name of the character. type - The character type to be used; Can be either: boyfriend, dad or gf. precacheImage(name:String) Pre-caches the image sprite; Must be relative to mods/images, assets/images, or assets/shared/images folders. name - The image sprite for the sprite to use. precacheSound(name:String) Pre-caches the sound; Must be relative to mods/sounds or assets/sounds folders. name - The ogg sound file to be played. precacheMusic(name:String) Pre-caches the music; Must be relative to mods/music or assets/music folders. name - The ogg music file to be played. Object Order Functions setObjectOrder(obj:String, position:Int) Sets the current layer position of the object with a new value. obj - The object tag name to be used. position - The new layer position to be set. getObjectOrder(obj:String) Gets the current layer position of the object current value; Returns a float number. obj - The object tag name to be used. objectsOverlap(obj1:String, obj2:String) Checks if two objects are overlapping each-other; Returns a boolean. obj1 - The first object tag name to be used. obj2 - The second object tag name to be used. Scale Functions setGraphicSize(obj:String, x:Int, y:Int = 0, updateHitbox:Bool = true) Sets the object graphic size by pixels; Not to be confused with scaleObject(). obj - The object tag name to be used. x - The width value of the object to be set. y - The height value of the object to be set. updateHitbox - Whether it will update the object's dimension or hitbox; Defualt is true. scaleObject(obj:String, x:Float, y:Float, updateHitbox:Bool = true) Sets the object size by scale properties. obj - The object tag name to be used. x - The scale.x value of the object to be set. y - The scale.y value of the object to be set. updateHitbox - Whether it will update the object's dimension or hitbox; Defualt is true. updateHitbox(obj:String) Updates the object's dimension or hitboxes. Used this if you're changing scale of the object. obj - The object tag name to be used. Midpoint/Position Functions getGraphicMidpointX(variable:String) Gets the midpoint x value in graphics, of the object; Not to be confused with getMidpointX() function; Returns a float number. variable - The object tag name to be used. getGraphicMidpointY(variable:String) Gets the midpoint y value in graphics, of the object; Not to be confused with getMidpointY() function; Returns a float number. variable - The object tag name to be used. getMidpointX(variable:String) Gets the midpoint x value of the object; Returns a float number. variable - The object tag name to be used. getMidpointY(variable:String) Gets the midpoint y value of the object; Returns a float number. variable - The object tag name to be used. getScreenPositionX(variable:String) Gets the screen x position of the object; Returns a float number. variable - The object tag name to be used. getScreenPositionY(variable:String) Gets the screen y position of the object; Returns a float number. variable - The object tag name to be used. screenCenter(obj:String, pos:String = 'xy') Sets the object to screen center with the specified x or y position. obj - The object tag name to be used. pos - The position you want to set in; Can be either: X, Y, XY. Other Functions setScrollFactor(obj:String, scrollX:Float, scrollY:Float) Changes the object that moves along the camera when switching to characters. obj - The object tag name to be used. scrollX - The x value of the scroll to be set. scrollY - The y value of the scroll to be set. setObjectCamera(obj:String, camera:String) Changes the object camera state. obj - The object tag name to be used. camera - The camera state to be set in; Can be either: camGame, camHUD or camOther

object functions的評論 (共 條)

分享到微博請遵守國家法律
阳春市| 祁阳县| 林州市| 伊金霍洛旗| 乌拉特前旗| 斗六市| 观塘区| 隆回县| 汤阴县| 玉树县| 城口县| 礼泉县| 洪雅县| 莱西市| 吐鲁番市| 荥经县| 高密市| 宿迁市| 蓬莱市| 张家口市| 平山县| 耿马| 马山县| 七台河市| 洛隆县| 宁国市| 古浪县| 进贤县| 肇州县| 曲靖市| 阿拉善左旗| 凌海市| 北川| 五莲县| 专栏| 晋宁县| 灌阳县| 清徐县| 夹江县| 周至县| 昭觉县|