Beispiel #1
0
 public MapObject()
 {
     Blocking = true;
     Position = new MapPosition(0, 0);
     Quad     = new Quad {
         FragmentPositionY = 3.0
     };
 }
Beispiel #2
0
        public void Move(MapObject moveableObject, PositionChange direction)
        {
            var newPosition    = new MapPosition(moveableObject.Position, direction);
            var noStaticObject = _mapObjects.TrueForAll(staticObject => !staticObject.Position.Equals(newPosition) || !staticObject.Blocking);

            if (noStaticObject)
            {
                moveableObject.Position = newPosition;
            }
        }