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
// first we get the Instance of UniDictAPI. | |
UniDictAPI uniDictAPI = UniDict.getAPI(); | |
// getting the actual kind id isn't required, but it is a good practice, the methods accepts strings without any issues. | |
int ore = Resource.getKindFromName("ore"); | |
int dust = Resource.getKindFromName("dust"); | |
// we are getting the resources that contains ore, and dust. | |
// the getResources method acts as a filter, so we don't need to null-check the resources later. | |
// note: there is no limit here, so we could add way more than just ore, and dust. |