Example #1
0
        public void setEntrance()
        {
            _entranceTrigger  = new EntranceTrigger("Entrance.png", 1, 1);
            _entrance         = new Entrance(_entranceTrigger, _enteringRoom);
            _triggerXPosition = new IntRange(_enteringRoom.GetXPosition, _enteringRoom.GetXPosition + _enteringRoom.GetRoomWidth);
            entranceXPosition = (_startXPosition + 64) * 64;
            entranceYPosition = (_startYPosition + 64) * 64;
            _entrance.SetXY(entranceXPosition, entranceYPosition);
            _entranceTrigger.SetXY(_triggerXPosition.Random, _enteringRoom.GetYPosition);

            AddChild(_entrance);
            AddChild(_entranceTrigger);
        }
Example #2
0
 public Entrance(EntranceTrigger entranceTrigger, Room enteringRoom) : base("Entrance.png", 1, 1)
 {
     _entranceTrigger = entranceTrigger;
     enteringRoom     = _enteringRoom;
     animCount        = 0;
 }