Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+add Test Trail Effect to Main Character #18

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

yunyou730
Copy link
Contributor

image
测试代码在 ActorFactory 的 93行;

新增了 Resource/Effect/ 目录,用来做 Effect 相关的 Prefab;
Resources/Effect/Trail.prefab 用来做 拖尾表现;
将来拖尾类型多了可以考虑这里多创建 prefab ,或者代码里动态创建。比如trail 的宽度可以再prefab 里调整会比较方便;
Resources/Effect 目录下的 prefab 用 Effect/Common/CommonEffectFactory.cs 收口加载 ;

核心的代码是 在 Effect/Common/TrailController.cs。
这里有几个核心参数:

  1. _posOffset,用来表示 拖拽点 在原模型上的偏移;
  2. _defaultLifeSpan 表示一个点存活时间多久
  3. TraiController.cs 的 Update里面做了一些逻辑,用来让 点 不会无休止增加、点可以按时间销毁
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant