mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-13 21:40:50 +00:00
inline CreateWorldObject
This commit is contained in:
parent
0c833c4f8c
commit
4fb68a9283
@ -123,23 +123,17 @@ namespace QSB.WorldSync
|
||||
//DebugLog.DebugWrite($"{typeof(TWorldObject).Name} init : {list.Count} instances.", MessageType.Info);
|
||||
for (var id = 0; id < list.Count; id++)
|
||||
{
|
||||
var obj = CreateWorldObject<TWorldObject>();
|
||||
obj.AttachedObject = list[id];
|
||||
obj.ObjectId = id;
|
||||
var obj = new TWorldObject
|
||||
{
|
||||
AttachedObject = list[id],
|
||||
ObjectId = id
|
||||
};
|
||||
obj.Init();
|
||||
WorldObjects.Add(obj);
|
||||
WorldObjectsToUnityObjects.Add(list[id], obj);
|
||||
}
|
||||
}
|
||||
|
||||
private static TWorldObject CreateWorldObject<TWorldObject>()
|
||||
where TWorldObject : IWorldObject, new()
|
||||
{
|
||||
var worldObject = new TWorldObject();
|
||||
WorldObjects.Add(worldObject);
|
||||
|
||||
return worldObject;
|
||||
}
|
||||
|
||||
public static void HandleSlotStateChange(NomaiInterfaceSlot slot, NomaiInterfaceOrb affectingOrb, bool state)
|
||||
{
|
||||
var slotList = GetWorldObjects<QSBOrbSlot>().ToList();
|
||||
|
Loading…
x
Reference in New Issue
Block a user