Game Development Reference
In-Depth Information
edge = atlas.findRegion("rock_edge");
middle = atlas.findRegion("rock_middle");
}
}
Next is the gold coin. Its original filename is
item_gold_coin.png
and its inner class
is named
AssetGoldCoin
.
Add the following inner class to the
Assets
class:
public class AssetGoldCoin {
public final AtlasRegion goldCoin;
public AssetGoldCoin (TextureAtlas atlas) {
goldCoin = atlas.findRegion("item_gold_coin");
}
}
Next is the feather item. Its original filename is
item_feather.png
and its inner class
is named
AssetFeather
.
Add the following inner class to the
Assets
class:
public class AssetFeather {
public final AtlasRegion feather;
public AssetFeather (TextureAtlas atlas) {
feather = atlas.findRegion("item_feather");
}
}