public void Update(EntityDispositionInformations informations) { Direction = (DirectionsEnum)informations.direction; if (Map == null) logger.Error("Cannot define position of {0} with EntityDispositionInformations because Map is null", this); else Cell = Map.Cells[informations.cellId]; }
public ObjectPosition(Map map, EntityDispositionInformations disposition) : this(map, map.Cells[disposition.cellId], (DirectionsEnum) disposition.direction) { if (map == null) throw new ArgumentNullException("map"); if (disposition == null) throw new ArgumentNullException("disposition"); Map = map; Cell = map.Cells[disposition.cellId]; Direction = (DirectionsEnum)disposition.direction; }
public void Update(EntityDispositionInformations disposition) { if (disposition == null) throw new ArgumentNullException("disposition"); Position.Cell = Map.Cells[disposition.cellId]; Position.Direction = (DirectionsEnum) disposition.direction; }
public void Update(EntityDispositionInformations informations) { Direction = (DirectionsEnum)informations.direction; if (Map == null) logger.Error("Cannot define position of {0} with EntityDispositionInformations because Map is null", this); else if (Cell == null || Cell.Id != informations.cellId) { OnPropertyChanged("Cell"); Cell = Map.Cells[informations.cellId]; } }