chenxin
2020-10-28 3c28c50d98b501cbb253be52dafc9f1d3f700950
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
32
33
using UnityEngine;
 
namespace Core.Health
{
    /// <summary>
    /// Health change info - stores information about the health change
    /// </summary>
    public struct HealthChangeInfo
    {
        public Damageable damageable;
 
        public float oldHealth;
 
        public float newHealth;
 
        /// <summary>
        /// 用于标注是由哪个种类的Tower造成的伤害.
        /// </summary>
        public int attributeId;
 
        public IAlignmentProvider damageAlignment;
 
        public float healthDifference
        {
            get { return newHealth - oldHealth; }
        }
 
        public float absHealthDifference
        {
            get { return Mathf.Abs(healthDifference); }
        }
    }
}