2025-01-26 13:44:50 +08:00
|
|
|
|
|
|
|
|
|
# Class
|
|
|
|
|
## FightGameAction
|
|
|
|
|
FightGameAction => GameAction => HitBoxAction => Actor
|
|
|
|
|
|
|
|
|
|
CustomEvent:
|
|
|
|
|
- 继承事件:
|
|
|
|
|
- ActionStart:取得当前Pawn并且赋予FgPawn变量,以及当前AnimInstance赋予PawnAnim。
|
|
|
|
|
- SpecialEvent:调用IsParry()来判断是否是格挡事件,如果是就调用Parry事件。
|
|
|
|
|
- StrikeEvent:
|
|
|
|
|
1. StrikeFeedback:触发对应的反馈效果。包括粒子、声音、力、镜头摇晃。
|
|
|
|
|
2. ApplyHitDamage:应用伤害。
|
|
|
|
|
- OtherEvent:其他Hit逻辑。
|
|
|
|
|
- 新事件:
|
|
|
|
|
- Parry:格挡事件。
|
|
|
|
|
- Freeze:硬直效果。
|
|
|
|
|
- ResetFreeze:重置硬直效果。
|
|
|
|
|
|
|
|
|
|
### HitBoxAction
|
|
|
|
|
Component:
|
|
|
|
|
- HitBoxEditor:编辑用组件,用于编辑每帧Action时切换指定Index的帧。***ComponentTag:"hb.Editor"***
|
|
|
|
|
- FrameSlider
|
|
|
|
|
- FrameIdTx
|
|
|
|
|
- AnimSlider
|
|
|
|
|
|
|
|
|
|
Method:
|
|
|
|
|
- Initialize()
|
|
|
|
|
1. SetOwner()
|
|
|
|
|
2. SetFrameList():遍历所有HitBoxFrameComponent,并且根据**组件名称**取得FrameID
|
|
|
|
|
3. ActionStart():调用ActionStart()事件。
|
|
|
|
|
|
|
|
|
|
CustomEvent:
|
|
|
|
|
1. ActionStart
|
|
|
|
|
2. HitBox
|
|
|
|
|
3. OtherHits
|
|
|
|
|
|
|
|
|
|
Editor相关:
|
|
|
|
|
CustomEvent:
|
|
|
|
|
1. InitializeEditor
|
|
|
|
|
2. EditorSliders:根据FrameSlider、AnimSlider的当前帧数(根据相对Location来记录FrameId)来设置显示文字。
|
|
|
|
|
3. DestroyEditor
|
|
|
|
|
|
|
|
|
|
### GameAction
|
|
|
|
|
主要实现了HitBox事件。判断是否是StrikeEvent与SpcialEvent后,调用StrikeEvent()与SpcialEvent()。
|
|
|
|
|
|
|
|
|
|
CustomEvent:
|
|
|
|
|
1. StrikeEvent
|
|
|
|
|
2. SpcialEvent
|
|
|
|
|
|
|
|
|
|
Editor相关:
|
|
|
|
|
CustomEvent:
|
|
|
|
|
1. InitializeEditor:在父类事件的基础上,用相对位移来存储开始播放Montage的初始位置,设置到**SkeleMesh->AnimationData->InitialPosition**。
|
|
|
|
|
|
2025-01-27 21:18:10 +08:00
|
|
|
|
|
|
|
|
|
## ActionComponent
|
|
|
|
|
>主要使用这个组件来管理当前Action?设置HitBoxAction类给ChildActor,并且调用HitBoxAction的Initialize并且绑定ActionEvent。
|
|
|
|
|
|
|
|
|
|
Event
|
|
|
|
|
- BeginPlay:设置ChildActorComponent到ChildActor变量上。可根据Tag来选择ChildActorComponent。
|
|
|
|
|
- EndPlay:触发DestoryAction事件。
|
|
|
|
|
|
|
|
|
|
CustomEvent
|
|
|
|
|
- ***SetAction***:设置新的HitBoxAction类以及Frame Id。
|
|
|
|
|
- SetActionClass(),其中SetActionClass的逻辑会调用HitBoxAction的Initialize并且绑定ActionEvent。
|
|
|
|
|
- 调用Action类的SetActiveFrame()。
|
|
|
|
|
- NewAction:依次调用DestoryAction、SetAction事件。
|
|
|
|
|
- DestoryAction:将ChildActor置空。
|
|
|
|
|
|
2025-01-26 13:44:50 +08:00
|
|
|
|
## HitBoxFrame
|
2025-01-27 21:18:10 +08:00
|
|
|
|
HitBoxFrame => SceneComponent
|
|
|
|
|
|
|
|
|
|
CustomEvent
|
|
|
|
|
- InitializeFrame:
|
|
|
|
|
- UpdateFrame
|
|
|
|
|
- DestroyFrame
|