public bool ParseTarget(BinaryReader br, string id) { switch (id) { case "Name": currentTarget.name = MegaParse.ReadString(br); break; case "Percent": currentTarget.percent = br.ReadSingle(); break; case "MoPoints": int count = br.ReadInt32(); if (count > 0) { currentTarget.loadpoints = new MOPoint[count]; for (int i = 0; i < count; i++) { MOPoint p = new MOPoint(); p.id = br.ReadInt32(); // we need to find the ids for this point (could be more than one) p.p = ConvertPoint(MegaParse.ReadP3(br)); p.w = br.ReadSingle(); currentTarget.loadpoints[i] = p; } } break; } return(true); }
public bool ParseTarget(BinaryReader br, string id) { switch ( id ) { case "Name": currentTarget.name = MegaParse.ReadString(br); break; case "Percent": currentTarget.percent = br.ReadSingle(); break; case "MoPoints": int count = br.ReadInt32(); if ( count > 0 ) { currentTarget.loadpoints = new MOPoint[count]; for ( int i = 0; i < count; i++ ) { MOPoint p = new MOPoint(); p.id = br.ReadInt32(); // we need to find the ids for this point (could be more than one) p.p = ConvertPoint(MegaParse.ReadP3(br)); p.w = br.ReadSingle(); currentTarget.loadpoints[i] = p; } } break; } return true; }