// called by engine // creates default instance static Map Create(IntPtr ptr) { if(maps.ContainsKey(ptr)) throw new InvalidOperationException(string.Format("Map 0x{0:x} already added.", (int)ptr)); var map = new Map(ptr); maps[ptr] = map; return map; }
public MapEventArgs(Map map) { this.Map = map; }
public MapCritterDeadEventArgs(Map map, Critter cr, Critter killer) : base(map) { this.Cr = cr; this.Killer = killer; }
// called by engine void RaiseTurnBasedProcess(Map map, bool begin_turn) { if (TurnBasedProcess != null) TurnBasedProcess(this, new CritterTurnBasedProcessEventArgs(this, map, begin_turn)); }
// called by engine void RaiseSmthTurnBasedProcess(Critter from_cr, Map map, bool begin_turn) { if (SmthTurnBasedProcess != null) SmthTurnBasedProcess(this, new CritterSmthTurnBasedProcessEventArgs(this, from_cr, map, begin_turn)); }
public CritterTurnBasedProcessEventArgs(Critter cr, Map map, bool begin_turn) : base(cr) { this.Map = map; this.BeginTurn = begin_turn; }
public void MoveItem(Item item, uint count, Map to_map, ushort to_hx, ushort to_hy) { Global_MoveItemMap(item.ThisPtr, count, to_map.ThisPtr, to_hx, to_hy); }
public MapTurnBasedProcessEventArgs(Map map, Critter cr, bool begin_turn) : base(map) { this.Cr = cr; this.BeginTurn = begin_turn; }
public virtual void ViewMap(Map map, uint look, ushort hx, ushort hy, Direction dir) { Crit_ViewMap(thisptr, map.ThisPtr, look, hx, hy, (byte)dir); }
public virtual void EventTurnBasedProcess(Map map, bool begin_turn) { Crit_EventTurnBasedProcess(thisptr, map.ThisPtr, begin_turn); }
public virtual void EventSmthTurnBasedProcess(Critter from_cr, Map map, bool begin_turn) { Crit_EventSmthTurnBasedProcess(thisptr, from_cr.ThisPtr, map.ThisPtr, begin_turn); }
// called by engine static void RaiseTurnBasedProcess(Map map, Critter cr, bool begin_turn) { if (TurnBasedProcess != null) TurnBasedProcess(null, new MapTurnBasedProcessEventArgs(map, cr, begin_turn)); }
// called by engine static void RaiseTurnBasedEnd(Map map) { if (TurnBasedEnd != null) TurnBasedEnd(null, new MapEventArgs(map)); }
// called by engine static void RaiseTurnBasedBegin(Map map) { if (TurnBasedBegin != null) TurnBasedBegin(null, new MapEventArgs(map)); }
// called by engine static void RaiseMapCritterOut(Map map, Critter cr) { if (MapCritterOut != null) MapCritterOut(null, new MapInOutCritterEventArgs(map, cr)); }
public MapFinishEventArgs(Map map, bool to_delete) : base(map) { this.ToDelete = to_delete; }
public MapInOutCritterEventArgs(Map map, Critter cr) : base(map) { this.Cr = cr; }
public CritterSmthTurnBasedProcessEventArgs(Critter cr, Critter from_cr, Map map, bool begin_turn) : base(cr, map, begin_turn) { this.From = from_cr; }
public MapChainEventArgs(Map map) { this.Map = map; }
public void MoveItems(IList<Item> items, Map to_map, ushort to_hx, ushort to_hy) { if (items == null) throw new ArgumentNullException ("items"); Global_MoveItemsMap(items, to_map.ThisPtr, to_hx, to_hy); }