mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
16 lines
389 B
C#
16 lines
389 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace QSB.WorldSync
|
|
{
|
|
public static class WorldRegistry
|
|
{
|
|
public static List<WorldObject> WorldObjects { get; } = new List<WorldObject>();
|
|
|
|
public static T GetObject<T>(int id) where T : WorldObject
|
|
{
|
|
return WorldObjects.OfType<T>().FirstOrDefault(x => x.Id == id);
|
|
}
|
|
}
|
|
}
|