Lecture 4
知识点:
Interface(接口):
- Interface classes are useful for ensuring that a set of (potentially) unrelated classes implement a common set of functions.
ActorComponent:
- ActorComponent is the base class for components that define reusable behavior that can be added to different types of Actors.
- SceneComponents
- ActorComponents that have a transform
- PrimitiveComponents
- ActorComponents that can be rendered
- SceneComponents
Note: Interface中U前缀的不需要改动,仅用于通知UE的Reflection System,I前缀的Interface才是需要改动的。而在使用时,调用的是I前缀的,检查是否实现了时需要检查U前缀的(常见BUG)。
项目内容:
- 添加新的GItemChest类,GGameplayInterface接口类
- 在GItemChest类中实现接口细节
- 添加新的ActorComponent组件 // 点状射线检测
- 在角色类中添加该组件,实现行为并绑定Input
- 实现另一种检测方式 // 通过SweepMultiByObjectType实现球状射线检测
- 优化发射火球的动作 // 使用timer进行delay,未来可利用Animation Notifier优化