public void Reset() { _block = BlockType.KeyBarrier; _sprite = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true); Bounds = new Rectangle(_location, new Point(20, 20)); Unlocked = false; }
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); }
public void Unlock() { Unlocked = true; _block = BlockType.InvisibleBlock; Bounds = new Rectangle(_location, new Point(0, 0)); _sprite = new AlphaPassMask(BlockTypeSprite.Sprite(UnlockedType()), true); }
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)); }
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); }
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); }
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); }
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); }
public override void Unblock() { _unlocked = true; SoundEffectManager.Instance.PlayDoorUnlock(); _sprite = BlockTypeSprite.Sprite(BlockType.DoorRight); }
public override void Reset() { _sprite = BlockTypeSprite.Sprite(BlockType.DoorSpecialRight3_1); _unlocked = false; }
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); }
public Barrier(Point location, BlockType block) { Bounds = CalculateBounds(location, block); _location = location; _sprite = BlockTypeSprite.Sprite(block); }
public Overlay(Point location, BlockType block) { _location = location; _sprite = new AlphaPassMask(BlockTypeSprite.Sprite(block), false); }
public override void Reset() { _sprite = new AlphaPassMask(BlockTypeSprite.Sprite(_block), true); _unlocked = false; }
public void Unlock() { Unlocked = true; _sprite = new AlphaPassMask(BlockTypeSprite.Sprite(UnlockedType()), true); }
public override void Reset() { _activations = 0; _sprite = BlockTypeSprite.Sprite(BlockType.DoorSpecialLeft2_1); _unlocked = false; }