缓存下面结果
AtlasRegion com.badlogic.gdx.graphics.g2d.TextureAtlas.findRegion(String name)
当前还有其他的方法,只要是对 com.badlogic.gdx.graphics.g2d.TextureAtlas 中 regions 中获取的操作。
regions 具体引用情况查看源码
主要是因为查找的方法是一个很“昂贵”的功能调用,所有调用后就把结果存起来,避免重复调用造成性能问题
缓存下面结果
AtlasRegion com.badlogic.gdx.graphics.g2d.TextureAtlas.findRegion(String name)
当前还有其他的方法,只要是对 com.badlogic.gdx.graphics.g2d.TextureAtlas 中 regions 中获取的操作。
regions 具体引用情况查看源码
主要是因为查找的方法是一个很“昂贵”的功能调用,所有调用后就把结果存起来,避免重复调用造成性能问题