Files
Net.Project.B/Src/Melee/IMeleeService.cs

42 lines
1.2 KiB
C#
Raw Normal View History

2025-03-10 18:06:24 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
2025-08-03 02:28:22 +08:00
using System.Diagnostics.Eventing.Reader;
2025-03-10 18:06:24 +08:00
using Net.Project.B.Damage;
using Unity.Mathematics;
namespace Net.Project.B.Melee
{
public interface IMeleeData:IDamageType
{
public float3 StartPosition { get; }
public float Radius { get; }
public int Damage { get; }
public IReadOnlyCollection<string> Tags { get; }
public IReadOnlyCollection<string> IgnoreTags { get; }
public int Initiator { get; }
int MaxTargetCount { get; }
}
public class MeleeData:IMeleeData
{
public float3 StartPosition { get; set; }
public float Radius { get; set; }
public int Damage { get; set; }
IReadOnlyCollection<string> IMeleeData.Tags => Tags;
IReadOnlyCollection<string> IMeleeData.IgnoreTags => IgnoreTags;
public readonly List<string> Tags=new();
public readonly List<string> IgnoreTags = new();
public int Initiator { get; set; }
public int MaxTargetCount { get; set; }
}
public interface IMeleeService
{
public void Add(IMeleeData meleeData);
2025-08-03 02:28:22 +08:00
public event Action<IMeleeData,object> OnMeleeHit;
2025-03-10 18:06:24 +08:00
}
}