//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Wednesday, August 09, 2017 //-------------------------------------------------------- using UnityEngine; using System.Collections; using System; namespace Snxxz.UI { public class Equipment { public event Action levelUpEvent; public event Action starUpEvent; public int instanceId { get; private set; } public int configId { get; private set; } int m_Level = 0; public int level { get { return m_Level; } set { if(m_Level != value) { m_Level = value; if(levelUpEvent != null) { levelUpEvent(); } } } } int m_Star = 0; public int star { get { return m_Star; } set { if(m_Star != value) { m_Star = value; if(starUpEvent != null) { starUpEvent(); } } } } public Equipment(int _instanceId,int _configId) { this.instanceId = _instanceId; this.configId = _configId; } public static int Compare(Equipment _a,Equipment _b) { return _a.configId > _b.configId ? -1 : 1; } } }