public MirrorEntity(
            int x,
            int y,
            IMap map,
            MirrorPosition position)
            : base(
                EntityType.Mirror,
                x,
                y,
                MapLayer.PlayerBody,
                new[] {
            EntityProperty.PointIsBusy,
            EntityProperty.StopLazerRay
        })
        {
            Condition.Requires(map, nameof(map)).IsNotNull();

            this._map     = map;
            this.Position = position;
        }
 private void Rotate()
 {
     this.Position = this.Position == MirrorPosition.MainDiagonal
         ? MirrorPosition.SideDiagonal
         : MirrorPosition.MainDiagonal;
 }
Exemple #3
0
 public static LazerDirection GetReflectedRay(
     this MirrorPosition position,
     LazerDirection incomingRay)
 {
     return(ReflectedRay[position][incomingRay]);
 }