Aura.Channel.World.Dungeons.Puzzles.PuzzlePlace.DeclareLock C# (CSharp) Метод

DeclareLock() публичный Метод

Makes it a locked place with a locked door.
public DeclareLock ( bool lockSelf = false ) : void
lockSelf bool
Результат void
		public void DeclareLock(bool lockSelf = false)
		{
			var doorElement = _section.GetLock(lockSelf);
			if (doorElement == null)
				return;

			this.PlaceIndex = doorElement.PlaceIndex;
			_room = doorElement.Room;
			this.UpdatePosition();
			this.IsLock = true;
			this.LockColor = _section.GetLockColor();
			this.DoorDirection = doorElement.Direction;

			_room.ReserveDoor(this.DoorDirection);
			_room.isLocked = true;
			if (_room.RoomType != RoomType.End || _room.RoomType != RoomType.Start)
				_room.RoomType = RoomType.Room;

			// Boss door - special case
			if ((DungeonBlockType)_room.DoorType[this.DoorDirection] == DungeonBlockType.BossDoor)
			{
				this.IsBossLock = true;
				this.AddDoor(this.DoorDirection, DungeonBlockType.BossDoor);
			}
			else
				this.AddDoor(this.DoorDirection, DungeonBlockType.DoorWithLock);

			if (lockSelf)
				this.GetLockDoor().IsLocked = true;
		}