
1.3 Unity 4.3 场景设计
在Unity 4.3场景设计中,在大家熟悉上述的五个窗格、四个导航按钮的基础上,对小岛风光的演示项目,进行简单的场景设计,如设计不同的开始场景,重新设计海鸥的位置等。
1.3.1 设计开始场景
重新设计小岛风光的演示项目中的开始场景,移动“First Person Controller Prefab”对象到桥中位置,设计桥中场景;移动“First Person Controller Prefab”对象到岩石的相关位置,设计岩石场景。
1.设计桥中场景
运行小岛风光的演示项目,图1-38所示是原有的开始场景运行界面。

图1-38 原有的开始场景
停止运行小岛风光的演示项目。在层次窗格中,首先选择First Person Controller Prefab对象,然后将鼠标放置在游戏场景窗格中,按下F键,这样就可以在游戏场景窗格中,定位并显示First Person Controller Prefab对象。
按下移动按钮,在Z坐标轴方向移动 “First Person Controller Prefab” 对象到桥中相关位置,实现将游戏开始场景移动到桥中,如图1-39所示。

图1-39 移动First Person Controller Prefab对象1
按下游戏场景按钮,移动、调整整个游戏场景到相关位置,然后再按下移动按钮,将First Person Controller Prefab对象移动到桥中位置,如图1-40所示。

图1-40 移动First Person Controller Prefab对象2
此时运行小岛风光的演示项目,出现如图1-41所示的桥中场景。

图1-41 桥中场景
2.设计岩石场景
按下游戏场景按钮,移动、调整整个游戏场景到相关位置,在游戏界面的左边出现两个高高的岩石,如图1-42所示。

图1-42 设计岩石场景1
在图1-42中,按下移动按钮,在X轴方向、 Z轴方向分别移动 “First Person Controller Prefab”对象到岩石附近的沙滩位置,如图1-43所示。

图1-43 设计岩石场景2
此时运行小岛风光的演示项目,出现如图1-44所示的岩石场景。

图1-44 岩石场景
1.3.2 重置海鸥位置
重置海鸥位置,将原有的海鸥放置在岩石场景的沙滩之上,并在岩石沙滩上设计多个海鸥。
1.设计海鸥位置
在游戏层次窗格中,选择“HeronPrefab”对象,按下游戏场景按钮,移动整个游戏场景到如图1-45所示位置。

图1-45 选择海鸥
按下移动按钮,在X轴方向、Z轴方向分别移动“HeronPrefab”对象到岩石附近的沙滩位置,如图1-46所示。

图1-46 移动海鸥
此时运行小岛风光的演示项目,出现如图1-47所示的海鸥场景。

图1-47 海鸥场景
2.设计多个海鸥
在游戏层次窗格中,选择“HeronPrefab”对象,按下Ctrl+D两次,复制两个“HeronPrefab”对象,这样就在沙滩上存在三个重叠的海鸥,分别设置另外两个海鸥距离少许,如图1-48所示。

图1-48 设计多个海鸥
此时运行小岛风光的演示项目,出现如图1-49所示的多个海鸥场景。

图1-49 多个海鸥场景
在运行小岛风光演示项目开始的时候,这些海鸥会向玩家走来,然后停止在画家面前;当玩家面向海鸥向前移动时,海鸥会调转方向而逃离。