public TtabItemMotiveTable(TtabItem parent, int[] counts, TtabItemMotiveTableType type) { this.parent = parent; this.counts = counts; this.type = type; int nrGroups = 0; if (counts != null) { nrGroups = counts.Length; } else { nrGroups = type == TtabItemMotiveTableType.Human ? 5 : 8; } items = new TtabItemMotiveGroupArrayList(new TtabItemMotiveGroup[nrGroups]); for (int i = 0; i < nrGroups; i++) { items[i] = new TtabItemMotiveGroup(this, counts != null ? counts[i] : -1, type); } }
public TtabItemMotiveGroup(TtabItemMotiveTable parent, int count, TtabItemMotiveTableType type) { this.parent = parent; this.count = count; this.type = type; int nrItems = count != -1 ? count : 16; items = new TtabItemMotiveItemArrayList(new TtabItemMotiveItem[nrItems < 16 ? 16 : nrItems]); if (type == TtabItemMotiveTableType.Human) { for (int i = 0; i < nrItems; i++) { items[i] = new TtabItemSingleMotiveItem(this); } } else { for (int i = 0; i < nrItems; i++) { items[i] = new TtabItemAnimalMotiveItem(this); } } }
public TtabItemMotiveTable(TtabItem parent, int[] counts, TtabItemMotiveTableType type, System.IO.BinaryReader reader) : this(parent, counts, type) { Unserialize(reader); }
public TtabItemMotiveGroup(TtabItemMotiveTable parent, int count, TtabItemMotiveTableType type, System.IO.BinaryReader reader) : this(parent, count, type) { Unserialize(reader); }