官术网_书友最值得收藏!

Finding the facts

In this game, the hero (player) plays the park ranger in charge of cleaning up Confederation National Park. In mission one, the park ranger has to find the missing flags for the flag monument and return them to their holders. The user will have to find five of 50 US flags. They will be placed at random locations in the world. The user will have to collect them, read about the associated states' trivia, and then bring the flags back once all the five flags have been found. The game comprises the following components:

  • FlagLocators: This GameObject hierarchy contains a set of potential flag locations. From these 10 potential locations, five will be randomly chosen.
  • Terrain: We introduce the terrain editor in this chapter and create a terrain mesh to replace the ground plane from Chapter 2, Interactive Objects and MissionMgr. As our design requires us to have a park-like setting for our game, the terrain editor is the best candidate for building this in the editor quickly and easily; the alternative is modelling the park in a 3D modelling program such as Maya and then exporting and importing into Unity. By adding grass, mountains, and trees we create a picturesque park that will serve as the backdrop and scene for our first game environment.
  • Monument: This GameObject hierarchy contains a set of five flagmount locations. These are the places where the flags will be attached once the user finds the missing flags and returns them.
  • MissionMgrHelper: This helper class allows a GameObject to manipulate the state of an already-existing mission. This is done by associating the script with a Prefab and then instantiating after a user interaction.
  • SetupMissionOne: To accomplish the objectives of the level, this class installs two missions in the MissionMgr class that we developed in the previous chapter and also picks the random flags and flag locations for those missions.
  • TriviaCardScript: This class displays a full screen texture on screen that represents a trivia card for a state. The script adjusts the size and layout of the texture and displays it centered on screen. These cards will appear when the flags are first picked up and when they are selected in the inventory.
  • MonumentMgr: The gameplay objective of this level is to locate flags and return them to a monument with a number of empty mounting points. This class provides an interface for the monument hierarchy to attach an object (a returned flag) to one of the monument's flagmount points.
  • SimpleDetachScript: This class detaches the GameObject that it is attached to, from any parent transforms, thereby making its parent the global coordinates. This is necessary for packaging GUITextures in a Prefab for instancing and then previewing.

The first two collections will be referenced by SetupMissionOne, which picks the flag locations, picks five Prefabs, and instances them. A number of Prefabs will need to be created as well to facilitate the flow logic across missions. Finally, some systems from Chapter 1, Introduction to E-Learning and the Three Cs of 3D Games, and Chapter 2, Interactive Objects and MissionMgr, will be updated to improve the gameplay.

主站蜘蛛池模板: 密山市| 拉萨市| 郓城县| 昭苏县| 民勤县| 荥经县| 贺州市| 从化市| 夏邑县| 巩义市| 丰原市| 陈巴尔虎旗| 蒙阴县| 奉新县| 清苑县| 思南县| 武冈市| 河池市| 聂荣县| 顺义区| 平顶山市| 林口县| 莱阳市| 达州市| 甘肃省| 定州市| 梨树县| 灵宝市| 玛纳斯县| 呼伦贝尔市| 长岭县| 大连市| 康马县| 循化| 新蔡县| 上杭县| 黄浦区| 镇赉县| 阿克陶县| 定边县| 于都县|