コード例 #1
0
 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];
 }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: Fighter.cs プロジェクト: Splitx/BehaviorIsManaged
 public void Update(EntityDispositionInformations disposition)
 {
     if (disposition == null) throw new ArgumentNullException("disposition");
     Position.Cell = Map.Cells[disposition.cellId];
     Position.Direction = (DirectionsEnum) disposition.direction;
 }
コード例 #4
0
 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];
         }
 }