158 lines
6.4 KiB
C#
158 lines
6.4 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>>();
|
|
onStartAttack = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, CharacterBase>>();
|
|
onFinishAttack = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase, CharacterBase, AttackResult>>();
|
|
onBeforeGetAttacked = new OrderedDictionary<string, PrioritizedAction<AttackAreaBase>>();
|
|
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>>();
|
|
}
|
|
}
|
|
|
|
#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, CharacterBase>> onStartAttack;
|
|
|
|
/// <summary>
|
|
/// 完成攻击时,参数为产生成攻击的攻击区域、被攻击目标和攻击结果
|
|
/// <para> 此时攻击结果已经计算完成,因此可以在这个事件中根据攻击结果进行一些后续处理 </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase, CharacterBase, AttackResult>> onFinishAttack;
|
|
|
|
/// <summary>
|
|
/// 被攻击前,参数为攻击者和攻击区域
|
|
/// <para> 此时还未开始攻击结果的计算,因此可以在这个事件中修改攻击区域 </para>
|
|
/// </summary>
|
|
public OrderedDictionary<string, PrioritizedAction<AttackAreaBase>> 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;
|
|
}
|
|
|
|
#endregion
|
|
} |