斯坦福CS193U-虚幻4C++课程学习笔记(3)

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

Note: Interface中U前缀的不需要改动,仅用于通知UE的Reflection System,I前缀的Interface才是需要改动的。而在使用时,调用的是I前缀的,检查是否实现了时需要检查U前缀的(常见BUG)。

项目内容:

  1. 添加新的GItemChest类,GGameplayInterface接口类
  2. 在GItemChest类中实现接口细节
  3. 添加新的ActorComponent组件 // 点状射线检测
  4. 在角色类中添加该组件,实现行为并绑定Input
  5. 实现另一种检测方式 // 通过SweepMultiByObjectType实现球状射线检测
  6. 优化发射火球的动作 // 使用timer进行delay,未来可利用Animation Notifier优化

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值