TexturePack:getTextureRegion: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/>

Revision as of 08:59, 3 September 2018


Available since: Gideros 2011.6
Class: TexturePack

Description


Returns the texture region of texture pack.

(TextureRegion) = TexturePack:getTextureRegion(texturename)

Parameters

texturename: (string)

Return values

Returns (TextureRegion) TextureRegion by specified name

Examples

Example

local pack = TexturePack.new({&quot;gfx/1.png&quot;, &quot;gfx/2.png&quot;, &quot;gfx/3.png&quot;, &quot;gfx/4.png&quot;})

local region1 = pack:getTextureRegion(&quot;gfx/1.png&quot;)
local region2 = pack:getTextureRegion(&quot;gfx/2.png&quot;)
local region3 = pack:getTextureRegion(&quot;gfx/3.png&quot;)
local region4 = pack:getTextureRegion(&quot;gfx/4.png&quot;)