blob: 8d24f6eeeda6b6320aa399667cb31f78deff6538 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HitInfo
{
public HitDefination defination;
/// <summary>
/// 记录这个hit命中的avatar
/// </summary>
private List<Avatar> m_HitAvatars = new List<Avatar>();
public void AddRecord(Avatar avatar)
{
if (!m_HitAvatars.Contains(avatar))
m_HitAvatars.Add(avatar);
}
// 招式结束后,清除记录的avatar
public void WipeRecords()
{
m_HitAvatars.Clear();
}
public bool HasRecord(Avatar avatar)
{
return m_HitAvatars.Contains(avatar);
}
}
|