Game Development Reference
In-Depth Information
MissionMgr . The MissionMgr class has a template of all missions, the tokens that
each mission is composed of, and the reward that should be given when a mission
is satisfied. When the MissionMgr class determines that a mission is complete and
that all of the tokens from that mission have been collected, it gives a reward to the
user.
Lastly, InventoryMgr is the system that handles the display of the interactive ob-
jects that have been collected. If an object is permitted to be collected, it will be ad-
ded to the inventory according to its CustomGameObj and then displayed in the in-
ventory at the bottom of the screen.
The following list outlines the classes that we will develop in this chapter:
CustomGameObj : This class contains the basic data about an object in our
game. It holds the object's name and type. This information will be used when
we interact with this object.
InteractiveObj : This class controls the behavior of an object that the user
will physically interact with in the game world. It makes the object rotate and
also detects when the player gets close enough to it to start an interaction.
InventoryMgr : This class tracks which interactive objects the user has col-
lected. It will also display them in the inventory at the bottom of the screen.
Objects can be either unique or can accumulate based on their type.
ObjectInteraction : This class describes how an interactive object
should behave and what will be the nature of interaction when the user in-
teracts with it. To start, we will use the OnCloseEnough event to dispatch a
collect and put into inventory interaction.
SimpleLifespanScript : This class is used by the reward objects that are
spawned when a mission is complete. This makes them disappear after a
predetermined amount of time.
MissionToken : This class represents an abstract logical component of a
mission or an objective. These will be collected in ways similar to inventory
objects.
Mission : This class represents a collection of mission tokens. When the
player obtains all of the tokens, the learning objective will be deemed satis-
fied.
MissionMgr : This class stores all of the missions currently accessible to the
user. It will validate each mission to determine if the player has acquired all
Search WWH ::




Custom Search