using System; using System.Collections.Generic; using Cielonos.MainGame.Characters; using SLSUtilities.General; using UnityEngine; namespace Cielonos.MainGame.Inventory.Collections { /// /// 反射棱镜 / Reflection Prism /// 格挡敌人的投射物后会将其反弹回去。 /// public partial class ReflectionPrism : PassiveEquipmentBase { public override void OnObtained() { base.OnObtained(); Action onBlockSuccess = OnBlockSuccess; player.eventSm.onBlockSuccess.Add("ReflectionPrism", onBlockSuccess.ToPrioritized(-100)); } } public partial class ReflectionPrism { private void OnBlockSuccess(AttackAreaBase attackArea, BlockSource blockSource) { player.reactionSc.reflectionSm.ApplyReflection(player, this, "ReflectionPrism_Reflection", 0, 0.01f, area => area is Projectile, area => (area as Projectile)!.Reflect(player)); } } }