Пример #1
0
 public void Reset()
 {
     _block   = BlockType.KeyBarrier;
     _sprite  = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true);
     Bounds   = new Rectangle(_location, new Point(20, 20));
     Unlocked = false;
 }
Пример #2
0
        public LockedDoor(IDungeonManager dungeon, Point location, BlockType block) : base(dungeon, location, UnlockedType(block))
        {
            _block = block;
            switch (block)
            {
            case BlockType.DoorLockedRight:
                TransitionEffect = new Transition(dungeon, Direction.Right, true);
                break;

            case BlockType.DoorLockedLeft:
                TransitionEffect = new Transition(dungeon, Direction.Left, true);
                break;

            case BlockType.DoorLockedUp:
                TransitionEffect = new Transition(dungeon, Direction.Up, true);
                break;

            case BlockType.DoorLockedDown:
                TransitionEffect = new Transition(dungeon, Direction.Down, true);
                break;

            default:
                throw new ArgumentOutOfRangeException(block.ToString());
            }
            _sprite = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true);
        }
Пример #3
0
 public void Unlock()
 {
     Unlocked = true;
     _block   = BlockType.InvisibleBlock;
     Bounds   = new Rectangle(_location, new Point(0, 0));
     _sprite  = new AlphaPassMask(BlockTypeSprite.Sprite(UnlockedType()), true);
 }
Пример #4
0
 public KeyBarrierCenter(Point location, BlockType block)
 {
     _block    = block;
     _sprite   = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true);
     _location = location;
     Unlocked  = false;
     Bounds    = new Rectangle(location, new Point(32, 32));
 }
Пример #5
0
 public Stair(DungeonManager dungeon, Point location, BlockType block)
 {
     Bounds          = new Rectangle(location, new Point(16, 16));
     _drawLocation   = location.ToVector2();
     _dungeonManager = dungeon;
     _block          = block;
     _sprite         = BlockTypeSprite.Sprite(block);
 }
Пример #6
0
        public RupeeBarrier(Point location, BlockType block)
        {
            _block    = block;
            _sprite   = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true);
            _location = location;
            Bounds    = new Rectangle(_location, new Point(20, 20));

            if (!Unlocked)
            {
                return;
            }
            _block  = BlockType.InvisibleBlock;
            Bounds  = new Rectangle(_location, new Point(0, 0));
            _sprite = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true);
        }
Пример #7
0
        public NormalDoor(IDungeonManager dungeon, Point location, BlockType block)
        {
            Location   = location;
            DrawOffset = Point.Zero;

            switch (block)
            {
            case BlockType.DoorRight:
                Size             = new Point(32, 48);
                NoOpArea         = new Rectangle(0, 16, 16, 16);
                TransitionArea   = new Rectangle(16, 16, 16, 16);
                TransitionEffect = new Transition(dungeon, Direction.Right);
                DrawOffset       = new Point(0, 8);
                break;

            case BlockType.DoorLeft:
                Size             = new Point(32, 48);
                NoOpArea         = new Rectangle(16, 16, 16, 16);
                TransitionArea   = new Rectangle(0, 16, 16, 16);
                TransitionEffect = new Transition(dungeon, Direction.Left);
                DrawOffset       = new Point(0, 8);
                break;

            case BlockType.DoorUp:
                Size             = new Point(32, 32);
                NoOpArea         = new Rectangle(8, 24, 16, 8);
                TransitionArea   = new Rectangle(8, 0, 16, 24);
                TransitionEffect = new Transition(dungeon, Direction.Up);
                break;

            case BlockType.DoorDown:
                Size             = new Point(32, 32);
                NoOpArea         = new Rectangle(8, 0, 16, 16);
                TransitionArea   = new Rectangle(8, 16, 16, 16);
                TransitionEffect = new Transition(dungeon, Direction.Down);
                break;

            default:
                throw new ArgumentOutOfRangeException(block.ToString());
            }

            Sprite = new AlphaPassMask(BlockTypeSprite.Sprite(block), true);
        }
Пример #8
0
 public override void Unblock()
 {
     _unblocked = true;
     _sprite    = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true);
 }
 public ProjectilePassthroughBarrier(Point location, BlockType block)
 {
     Bounds    = CalculateBounds(location, block);
     _location = location;
     _sprite   = BlockTypeSprite.Sprite(block);
 }
Пример #10
0
 public override void Unblock()
 {
     _unlocked = true;
     SoundEffectManager.Instance.PlayDoorUnlock();
     _sprite = BlockTypeSprite.Sprite(BlockType.DoorRight);
 }
Пример #11
0
 public override void Reset()
 {
     _sprite   = BlockTypeSprite.Sprite(BlockType.DoorSpecialRight3_1);
     _unlocked = false;
 }
Пример #12
0
 public DoorSpecialRight3_1(IDungeonManager dungeon, Point location) : base(dungeon, location, BlockType.DoorRight)
 {
     TransitionEffect = new Transition(dungeon, Direction.Right, true);
     _sprite          = BlockTypeSprite.Sprite(BlockType.DoorSpecialRight3_1);
 }
Пример #13
0
 public Barrier(Point location, BlockType block)
 {
     Bounds    = CalculateBounds(location, block);
     _location = location;
     _sprite   = BlockTypeSprite.Sprite(block);
 }
Пример #14
0
 public Overlay(Point location, BlockType block)
 {
     _location = location;
     _sprite   = new AlphaPassMask(BlockTypeSprite.Sprite(block), false);
 }
Пример #15
0
 public override void Reset()
 {
     _sprite   = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true);
     _unlocked = false;
 }
Пример #16
0
 public void Unlock()
 {
     Unlocked = true;
     _sprite  = new AlphaPassMask(BlockTypeSprite.Sprite(UnlockedType()), true);
 }
Пример #17
0
 public override void Reset()
 {
     _activations = 0;
     _sprite      = BlockTypeSprite.Sprite(BlockType.DoorSpecialLeft2_1);
     _unlocked    = false;
 }