Update assets and add getAtlasSettings() for texture atlas characters
Co-authored-by: VirtuGuy <Wyatt2010shaw@gmail.com>
This commit is contained in:
committed by
Abnormal
co-authored by
VirtuGuy
parent
d311a3ad5b
commit
d35fe9726b
+1
-1
Submodule assets updated: 1441941c62...488058ab55
@@ -47,13 +47,13 @@ class AnimateAtlasCharacter extends BaseCharacter
|
||||
originalSizes.set(this.width, this.height);
|
||||
}
|
||||
|
||||
function loadAtlas()
|
||||
function loadAtlas():Void
|
||||
{
|
||||
trace('[ATLASCHAR] Loading sprite atlas for ${characterId}.');
|
||||
var assetLibrary:String = Paths.getLibrary(_data.assetPath);
|
||||
var assetPath:String = Paths.stripLibrary(_data.assetPath);
|
||||
|
||||
loadTextureAtlas(assetPath, assetLibrary, cast _data.atlasSettings);
|
||||
loadTextureAtlas(assetPath, assetLibrary, getAtlasSettings());
|
||||
|
||||
if (_data.isPixel)
|
||||
{
|
||||
@@ -69,7 +69,7 @@ class AnimateAtlasCharacter extends BaseCharacter
|
||||
this.setScale(_data.scale);
|
||||
}
|
||||
|
||||
function loadAnimations()
|
||||
function loadAnimations():Void
|
||||
{
|
||||
trace('[ATLASCHAR] Loading ${_data.animations.length} animations for ${characterId}');
|
||||
|
||||
@@ -100,4 +100,13 @@ class AnimateAtlasCharacter extends BaseCharacter
|
||||
{
|
||||
return originalSizes.y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the configuration for the texture atlas.
|
||||
* @return The configuration for the texture atlas.
|
||||
*/
|
||||
public function getAtlasSettings():AtlasSpriteSettings
|
||||
{
|
||||
return cast _data.atlasSettings;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class MultiAnimateAtlasCharacter extends BaseCharacter
|
||||
originalSizes.set(this.width, this.height);
|
||||
}
|
||||
|
||||
function loadAtlases()
|
||||
function loadAtlases():Void
|
||||
{
|
||||
trace('[MULTIATLASCHAR] Loading sprite atlases for ${characterId}.');
|
||||
|
||||
@@ -65,7 +65,7 @@ class MultiAnimateAtlasCharacter extends BaseCharacter
|
||||
var baseAssetLibrary:String = Paths.getLibrary(_data.assetPath);
|
||||
var baseAssetPath:String = Paths.stripLibrary(_data.assetPath);
|
||||
|
||||
loadTextureAtlas(baseAssetPath, baseAssetLibrary, cast _data.atlasSettings);
|
||||
loadTextureAtlas(baseAssetPath, baseAssetLibrary, getAtlasSettings());
|
||||
|
||||
for (asset in assetList)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ class MultiAnimateAtlasCharacter extends BaseCharacter
|
||||
this.setScale(_data.scale);
|
||||
}
|
||||
|
||||
function loadAnimations()
|
||||
function loadAnimations():Void
|
||||
{
|
||||
trace('[MULTIATLASCHAR] Loading ${_data.animations.length} animations for ${characterId}');
|
||||
|
||||
@@ -126,4 +126,13 @@ class MultiAnimateAtlasCharacter extends BaseCharacter
|
||||
{
|
||||
return originalSizes.y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the configuration for the texture atlas.
|
||||
* @return The configuration for the texture atlas.
|
||||
*/
|
||||
public function getAtlasSettings():AtlasSpriteSettings
|
||||
{
|
||||
return cast _data.atlasSettings;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user