178 lines
7.7 KiB
C#
178 lines
7.7 KiB
C#
using System.Collections.Generic;
|
|
using SLSUtilities.General;
|
|
using SoftCircuits.Collections;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Characters
|
|
{
|
|
public partial class EventSubmodule : SubmoduleBase<CharacterBase>
|
|
{
|
|
public EventSubmodule(CharacterBase owner) : base(owner)
|
|
{
|
|
onCombatStart = new OrderedDictionary<string, PrioritizedAction>();
|
|
onCombatEnd = new OrderedDictionary<string, PrioritizedAction>();
|
|
|
|
onHealthChanged = new OrderedDictionary<string, PrioritizedAction<float>>();
|
|
onEnergyChanged = new OrderedDictionary<string, PrioritizedAction<float>>();
|
|
|
|
onFirstJump = new OrderedDictionary<string, PrioritizedAction>();
|
|
onJumpLand = new OrderedDictionary<string, PrioritizedAction>();
|
|
onDashStart = new OrderedDictionary<string, PrioritizedAction>();
|
|
onDashEnd = new OrderedDictionary<string, PrioritizedAction>();
|
|
onDodgeStart = new OrderedDictionary<string, PrioritizedAction>();
|
|
onDodgeEnd = new OrderedDictionary<string, PrioritizedAction>();
|
|
|
|
|
|
onGetHit = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase>>();
|
|
onGetBreakthrough = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase>>();
|
|
onStartAttack = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, CharacterBase, AttackResult>>();
|
|
onFinishAttack = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, CharacterBase, AttackResult>>();
|
|
onBeforeGetAttacked = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, AttackResult>>();
|
|
onAfterGetAttacked = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, AttackResult>>();
|
|
onBlockSuccess = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, BlockSource>>();
|
|
onNormalBlockSuccess = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, BlockSource>>();
|
|
onPerfectBlockSuccess = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, BlockSource>>();
|
|
onNormalDodgeSuccess = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, DodgeSource>>();
|
|
onPerfectDodgeSuccess = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, DodgeSource>>();
|
|
}
|
|
}
|
|
|
|
#region Combat Events
|
|
|
|
public partial class EventSubmodule
|
|
{
|
|
/// <summary>
|
|
/// 战斗开始时
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onCombatStart;
|
|
|
|
/// <summary>
|
|
/// 战斗结束时
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onCombatEnd;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Action Events
|
|
|
|
public partial class EventSubmodule
|
|
{
|
|
/// <summary>
|
|
/// 第一次跳跃时
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onFirstJump;
|
|
|
|
/// <summary>
|
|
/// 跳跃落地时
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onJumpLand;
|
|
|
|
/// <summary>
|
|
/// 冲刺开始时
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onDashStart;
|
|
|
|
/// <summary>
|
|
/// 冲刺结束时
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onDashEnd;
|
|
|
|
/// <summary>
|
|
/// 闪避开始时,注意,冲刺也属于闪避,会触发这个事件
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onDodgeStart;
|
|
|
|
/// <summary>
|
|
/// 闪避结束时,注意,冲刺也属于闪避,会触发这个事件
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction> onDodgeEnd;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Attribute Change Events
|
|
|
|
public partial class EventSubmodule
|
|
{
|
|
/// <summary>
|
|
/// 生命变化时,参数为变化的数值
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<float>> onHealthChanged;
|
|
|
|
/// <summary>
|
|
/// 能量变化时,参数为变化的数值
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<float>> onEnergyChanged;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Attack Interaction Events
|
|
|
|
public partial class EventSubmodule
|
|
{
|
|
/// <summary>
|
|
/// 被击中时。参数为产生命中的攻击区域。
|
|
/// <para> 注意,不需要必须受到伤害 </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase>> onGetHit;
|
|
|
|
/// <summary>
|
|
/// 被突破时。参数为产生产击破的攻击区域。
|
|
/// <para> 注意,不需要必须受到伤害 </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase>> onGetBreakthrough;
|
|
|
|
/// <summary>
|
|
/// 开始攻击时。参数为产生成攻击的攻击区域、被攻击目标和(未完成的)攻击结果。
|
|
/// <para> 此时还未开始攻击结果的计算,因此可以在这个事件中利用 AttackResult 进而修改其内部的 AttackValue </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, CharacterBase, AttackResult>> onStartAttack;
|
|
|
|
/// <summary>
|
|
/// 完成攻击时,参数为产生成攻击的攻击区域、被攻击目标和(已完成的)攻击结果
|
|
/// <para> 此时攻击结果已经计算完成,因此可以在这个事件中根据攻击结果进行一些后续处理 </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, CharacterBase, AttackResult>> onFinishAttack;
|
|
|
|
/// <summary>
|
|
/// 被攻击前,参数为攻击区域和攻击结果
|
|
/// <para> 此时还未开始扣血和打断动作逻辑,因此可以在这个事件中一票否决(设定isImmune)或者修改即将受到的最终伤害修饰算子 </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, AttackResult>> onBeforeGetAttacked;
|
|
|
|
/// <summary>
|
|
/// 被攻击后,参数为攻击区域和攻击结果
|
|
/// <para> 此时攻击结果已经计算完成,因此可以在这个事件中根据攻击结果进行一些后续处理 </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, AttackResult>> onAfterGetAttacked;
|
|
|
|
/// <summary>
|
|
/// (任何)格挡成功时,参数为攻击区域和格挡来源
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, BlockSource>> onBlockSuccess;
|
|
|
|
/// <summary>
|
|
/// 普通格挡成功时,参数为攻击区域和格挡来源
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, BlockSource>> onNormalBlockSuccess;
|
|
|
|
/// <summary>
|
|
/// 完美格挡成功时,参数为攻击区域和格挡来源
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, BlockSource>> onPerfectBlockSuccess;
|
|
|
|
/// <summary>
|
|
/// 普通闪避成功时,参数为闪避来源
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, DodgeSource>> onNormalDodgeSuccess;
|
|
|
|
/// <summary>
|
|
/// 完美闪避成功时,参数为闪避来源
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, DodgeSource>> onPerfectDodgeSuccess;
|
|
}
|
|
|
|
#endregion
|
|
} |