using System.IO; using UnityEngine; namespace H2Engine { [System.Serializable] public class Evt_RefreshMonster : Evt { public enum E_OverCondition { DeadCount, Time, } public enum E_RefreshType { All, OneByOneTime,// 根据时间刷新 OneByOnePrevDie,// 前一只刷出已死亡 } public MonsterData[] monsters; public E_OverCondition overCondition = E_OverCondition.DeadCount; public E_RefreshType refreshType = E_RefreshType.All; /// /// 参数 /// 当使用OverCondition类型为DeadCount的时候为个数 /// 当使用OverCondition类型为Time的时候为时间(毫秒) /// public int conditionParam; /// /// 刷新参数 /// 刷新类型: OneByOneTime, 作为时间(毫秒) /// public int refreshParam; public int nextEventID = -1; public override void Load(BinaryReader br) { base.Load(br); overCondition = (Evt_RefreshMonster.E_OverCondition)br.ReadByte(); refreshType = (Evt_RefreshMonster.E_RefreshType)br.ReadByte(); refreshParam = br.ReadInt32(); conditionParam = br.ReadInt32(); nextEventID = br.ReadInt32(); int _count = br.ReadInt32(); monsters = new MonsterData[_count]; for (int i = 0; i < _count; ++i) { monsters[i] = new MonsterData(); monsters[i].Load(br); } } } }