/// <summary> /// Konstruktur des Item Info Objektes. /// </summary> /// <param name="item">Referenz auf das betroffene Item.</param> /// <param name="observer">Referenz auf das betrachtende Item.</param> public FactionItemInfo(FactionItem item, Item observer) : base(item, observer) { factionItem = item; observerFaction = -1; if (observer is FactionItem) { observerFaction = (observer as FactionItem).Faction.SlotIndex; } }
/// <summary> /// Generate a Unit/Item/Interop Combination based on the Unit and Item /// </summary> /// <param name="unit">Unit Instance</param> /// <param name="item">Item Instance</param> /// <returns></returns> protected UnitGroup CreateUnit(FactionUnit unit, FactionItem item) { // TODO: Check valid Types UnitInterop unitInterop = Context.Resolver.CreateUnitInterop(this, item) as UnitInterop; unit.Init(unitInterop); var group = new UnitGroup() { Item = item, Interop = unitInterop, Unit = unit }; Units.Add(item, group); return(group); }
public UnitInterop(Faction faction, FactionItem item) { if (faction == null) { throw new ArgumentNullException("faction"); } // Faction soll bereits teil eines Levels sein. if (faction.Level == null) { throw new ArgumentException("Faction is not Part of a Level"); } // AntItem darf nicht null sein. if (item == null) { throw new ArgumentNullException("item"); } Faction = faction; Item = item; }
/// <summary> /// Default Constructor for the Type Mapper. /// </summary> /// <param name="item">Related Engine Item</param> public FactionItemState(FactionItem item) : base(item) { SlotIndex = item.Faction.SlotIndex; }