https://github.com/jinhyeonseo01/priorityqueue
PriorityQueue for Unity C# - Script that converted the .Net offLcial PriorityQueue for use in Unity
https://github.com/jinhyeonseo01/priorityqueue
binary-heap csharp dotnet dotnet-core heap priority-queue unity
Last synced: 11 months ago
JSON representation
PriorityQueue for Unity C# - Script that converted the .Net offLcial PriorityQueue for use in Unity
- Host: GitHub
- URL: https://github.com/jinhyeonseo01/priorityqueue
- Owner: jinhyeonseo01
- Created: 2023-12-28T00:40:48.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-24T07:49:26.000Z (over 1 year ago)
- Last Synced: 2024-11-24T08:27:18.551Z (over 1 year ago)
- Topics: binary-heap, csharp, dotnet, dotnet-core, heap, priority-queue, unity
- Language: C#
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# PriorityQueue for Unity C#
**Script that converted the .Net offLcial PriorityQueue for use in Unity**
*(Unity에서 사용하기 위해 .Net C# 13 공식 PriorityQueue를 변환한 스크립트)*
*.Net offLcial syntax 100% compatible.*
*update - C# 13 version compatible*
* * *
### .Net Official System Collections
> **Documentation Link:** [https://learn.microsoft.com/PriorityQueue](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.priorityqueue-2?view=net-8.0/)
> **도큐먼트 링크:** [https://learn.microsoft.com/PriorityQueue](https://learn.microsoft.com/ko-kr/dotnet/api/system.collections.generic.priorityqueue-2?view=net-8.0)
### Example
``` cs
PriorityQueue testQueue = new PriorityQueue(10);
testQueue.Enqueue("World", 2);
testQueue.Enqueue("Hello", 1);
testQueue.Enqueue("!", 3);
while (testQueue.TryDequeue(out var element, out var priority))
Debug.Log(element);
//result
//Hello
//World
//!
```