public float delayTime; //a pause to take before spawning public EnemyInstanceInfo Clone() { EnemyInstanceInfo clone = new EnemyInstanceInfo(); clone.enemyLabel = enemyLabel; clone.path = path; clone.spawnAt = spawnAt; clone.lootTable = lootTable; clone.delayTime = delayTime; return(clone); }
public override void Decode(BinaryReader reader) { InJoyDebugBase.DebugCommandResponse(this, ref reader); errorCode = reader.ReadInt16(); if (errorCode > 0) { return; } triggerEnemyMapping = new Dictionary <string, List <EnemyInstanceInfo> >(); //enemy int count = reader.ReadInt16(); for (int i = 0; i < count; i++) { string triggerName = ReadString(reader); List <EnemyInstanceInfo> enemyList = new List <EnemyInstanceInfo>(); int enemyCount = reader.ReadInt16(); for (int j = 0; j < enemyCount; j++) { EnemyInstanceInfo info = new EnemyInstanceInfo(); info.spawnAt = (BornPoint.SpawnPointType)reader.ReadByte(); info.enemyLabel = ReadString(reader); info.delayTime = reader.ReadByte(); //read loot table info.lootTable = Utils.ParseLootList(reader); enemyList.Add(info); } triggerEnemyMapping.Add(triggerName, enemyList); } //static object staticObjMapping = new Dictionary <StaticObjectType, List <StaticObjectInfo> >(); count = reader.ReadInt16(); for (int i = 0; i < count; i++) { StaticObjectType type = (StaticObjectType)reader.ReadByte(); List <StaticObjectInfo> list; if (staticObjMapping.ContainsKey(type)) { list = staticObjMapping [type]; } else { list = new List <StaticObjectInfo>(); staticObjMapping.Add(type, list); } StaticObjectInfo info = new StaticObjectInfo(); info.type = type; info.lootTable = Utils.ParseLootList(reader); list.Add(info); } }