Created
March 20, 2017 01:11
-
-
Save Majirefy/6d379bbcdbd819abfbdf8f861772520a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun createAnimation(names: Array<String>): Animation { | |
val frames = com.badlogic.gdx.utils.Array<TextureRegion>() | |
frames.setSize(names.size) | |
for (i in names.indices) { | |
val path = names[i] | |
frames[i] = textureAtlas.findRegion(path) | |
} | |
return Animation(GameSettings.ANIMATION_FRAME_DURATION, frames) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment