UE4之GamePlay
2016-05-18 16:45
567 查看
问题:
1. World与Level的概念
2. Actor的概念
3. Actor与Component关系
4. Player, LocalPlayer, PlayerController的概念
5. CameraManager
6. PlayMode
7. PlayerInput
###[作图一幅]
![](http://img.blog.csdn.net/20160526212825500?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
LocalPlayer是在Game中提供的一个对象,用于表示真实玩家,而LocalPlayer又通过在World中放置PlayerController来控制玩家的Pawn。
LocalPlayer起到了真实玩家和游戏世界的桥梁作用。 一个游戏进程可以有多个localPlayer,比如同屏2人玩各有自己的分画面(这种游戏很少见了(如2人同时开飞机比赛吗))。
###[官方]
(来自: https://docs.unrealengine.com/latest/INT/Gameplay/index.html https://docs.unrealengine.com/latest/INT/GettingStarted/Terminology/index.html
)
Level
用户定义的一个游戏区域(上面可以摆放植被、树木、地形、野怪等),并且可以在Level-Blueprint里定义该Level的逻辑处理。
每个Level在编辑器里制作后保存为umap后缀的文件,所以也被称为Map。
World
World就是表示当前的游戏世界, 同时可以包含多个Levels,这些Levels拼凑成一个巨大的游戏场景。World可以动态加载这些 Levels(根据玩家在世界的何处),这个技术称为Streaming Level。通过World提供的Spwan()接口,我们可以在游戏进行时动态地 添加Actors。
Actor
Actor是放在Level中的基本的实体,它可以动态地被创建到World中。
Component
Component是一个功能对象体, 它隶属于Actor, 通过给Actor添加不同的Component来赋予它不同的功能特性。
如一个StaticMesh-Component就会让Actor能够在场景画面上有视觉表现, 一个Audio-Component让Actor能够发出
声音功能。RotatingMovement-Component可以让Actor在世界中移动旋转。
Pawn
Pawn是一个特殊的Actor,表示游戏世界中的生命体, 它可以被Controller控制,并且可以被设置成可接受用户的Input, 它不局限于表示人类。
The Pawn class is the base class of all Actors that can be controlled by players or AI. A Pawn is the physical representation of a player
or AI entity within the world. This not only means that the Pawn determines what the player or AI entity looks like visually, but also how
it interacts with the world in terms of collisions and other physical interactions. This can be confusing in certain circumstances as some
types of games may not have a visible player mesh or avatar within the game. Regardless, the Pawn still represents the physical location,
rotation, etc. of a player or entity within the game.
Character
Character是一个类人的Pawn. 它带有用于碰撞的胶囊体(CapsuleComponent)和人物运动组件(CharacterMovementComponent),它做基本的类人运动。
HUD
A HUD is a "heads-up display",用于在屏幕上显示二维的UI信息(如血条、玩家名称等). NOTE: 每个PlayerController只有一个AHUD类对象.
Camera
PlayerCameraManager相当于人的眼睛. NOTE: 每个PlayerController只有一个PlayerCameraManager.
Camera工作流程:https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Camera/index.html
通过阅读上面的工作流程可知, 绘制场景时使用的SceneView参数是由PlayerCameraManager决定的,其它的Camera, CameraActor, ViewTarget是用于辅助的。
GameMode
定义了游戏的规则. 不用的游戏有不同的GameMode,可以在Project Setting里配置
GameState
GameState包含了游戏的状态,如:当前游戏中的玩家列表、得分情况、玩家的任务清单完成情况等。
PlayerState
玩家的状态,如:名字、得分、等级等。
对象关系图如下:
1. World与Level的概念
2. Actor的概念
3. Actor与Component关系
4. Player, LocalPlayer, PlayerController的概念
5. CameraManager
6. PlayMode
7. PlayerInput
###[作图一幅]
LocalPlayer是在Game中提供的一个对象,用于表示真实玩家,而LocalPlayer又通过在World中放置PlayerController来控制玩家的Pawn。
LocalPlayer起到了真实玩家和游戏世界的桥梁作用。 一个游戏进程可以有多个localPlayer,比如同屏2人玩各有自己的分画面(这种游戏很少见了(如2人同时开飞机比赛吗))。
###[官方]
(来自: https://docs.unrealengine.com/latest/INT/Gameplay/index.html https://docs.unrealengine.com/latest/INT/GettingStarted/Terminology/index.html
)
Level
用户定义的一个游戏区域(上面可以摆放植被、树木、地形、野怪等),并且可以在Level-Blueprint里定义该Level的逻辑处理。
每个Level在编辑器里制作后保存为umap后缀的文件,所以也被称为Map。
World
World就是表示当前的游戏世界, 同时可以包含多个Levels,这些Levels拼凑成一个巨大的游戏场景。World可以动态加载这些 Levels(根据玩家在世界的何处),这个技术称为Streaming Level。通过World提供的Spwan()接口,我们可以在游戏进行时动态地 添加Actors。
Actor
Actor是放在Level中的基本的实体,它可以动态地被创建到World中。
Component
Component是一个功能对象体, 它隶属于Actor, 通过给Actor添加不同的Component来赋予它不同的功能特性。
如一个StaticMesh-Component就会让Actor能够在场景画面上有视觉表现, 一个Audio-Component让Actor能够发出
声音功能。RotatingMovement-Component可以让Actor在世界中移动旋转。
Pawn
Pawn是一个特殊的Actor,表示游戏世界中的生命体, 它可以被Controller控制,并且可以被设置成可接受用户的Input, 它不局限于表示人类。
The Pawn class is the base class of all Actors that can be controlled by players or AI. A Pawn is the physical representation of a player
or AI entity within the world. This not only means that the Pawn determines what the player or AI entity looks like visually, but also how
it interacts with the world in terms of collisions and other physical interactions. This can be confusing in certain circumstances as some
types of games may not have a visible player mesh or avatar within the game. Regardless, the Pawn still represents the physical location,
rotation, etc. of a player or entity within the game.
Character
Character是一个类人的Pawn. 它带有用于碰撞的胶囊体(CapsuleComponent)和人物运动组件(CharacterMovementComponent),它做基本的类人运动。
HUD
A HUD is a "heads-up display",用于在屏幕上显示二维的UI信息(如血条、玩家名称等). NOTE: 每个PlayerController只有一个AHUD类对象.
Camera
PlayerCameraManager相当于人的眼睛. NOTE: 每个PlayerController只有一个PlayerCameraManager.
Camera工作流程:https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Camera/index.html
通过阅读上面的工作流程可知, 绘制场景时使用的SceneView参数是由PlayerCameraManager决定的,其它的Camera, CameraActor, ViewTarget是用于辅助的。
GameMode
定义了游戏的规则. 不用的游戏有不同的GameMode,可以在Project Setting里配置
GameState
GameState包含了游戏的状态,如:当前游戏中的玩家列表、得分情况、玩家的任务清单完成情况等。
PlayerState
玩家的状态,如:名字、得分、等级等。
对象关系图如下:
相关文章推荐
- iOS学习之—— UIDevice、NSBundle、NSLocale
- iOS 视图UIview属性介绍 以及视图层次方法
- iOS8中提示框的使用UIAlertController(UIAlertView和UIActionSheet二合一)
- 使用UIBezierPath和CAShapeLayer画各种图形
- 10.UIImageView
- IOS开发 REST请求 ASIHTTPRequest用法
- iOS UITextFiled 后边的小叉号或是一次性删除输入的文字
- AndroidStudio导入新项目一直卡在Building gradle project info的解决解决方案
- PHP_SELF、 SCRIPT_NAME、 REQUEST_URI区别
- 一图了解View的生命周期,自定义view,invalidate()和requestLayout()调用
- Vue.js-----轻量高效的MVVM框架(二、Vue.js的简单入门)
- UEFI 安装win10 ubuntu双系统
- MultipartEntityBuilder.addTextBody 中文乱码
- ios学习--UIColor的你想知道的所有
- UIResponder
- UIControl
- 模拟Quintus引擎框架编码
- break continue 区别 以及实例
- 异步加载的requirejs,你值得拥有
- UITableView 调整分割线长度 等不常用属性总结