Пример #1
0
        private bool AddRoomProgress(int count)
        {
            bool isLevelChanged = false;

            if (count > 0)
            {
                int oldRoomProgress = roomProgress;
                roomProgress += count;

                if (roomProgress >= 100)
                {
                    if (roomLevel != RoomLevel.Hunter)
                    {
                        roomProgress   = 0;
                        isLevelChanged = true;
                    }
                    else
                    {
                        roomProgress = 100;
                    }
                }
                RavenhillEvents.OnRoomProgressChanged(oldRoomProgress, roomProgress, this);
            }
            return(isLevelChanged);
        }