O'Reilly logo

Mastering LibGDX Game Development by Patrick Hoey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shop store UI with items and money transactions

The final point of discussion in this chapter is the StoreInventoryUI class, as shown the following screenshot (Figure 11):

Shop store UI with items and money transactions

Figure 11

This class allows the player the ability to trade with various NPCs and is a fundamental feature for any RPG. This class is also a good example of how events can be triggered from a conversation, as we have discussed in the previous section, such as when we wish to see the wares of a shopkeeper.

The overall class relationship is represented in the following class diagram (Figure 12):

Figure 12

Again, PlayerHUD acts as a relay between the different UI windows that it owns, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required