using System.Collections.Generic; namespace Passer.Control { public class Thing { public Client client; public byte networkId; public byte id; public Thing parent; public byte type; public string name; public string modelUrl; //protected Sensor sensor; protected virtual void Init() { } public Thing(Client client, byte networkId, byte objId, byte objType) { this.client = client; this.id = objId; this.type = objType; this.networkId = networkId; this.Init(); allThings.Add(this); } public static List allThings = new(); public static Thing Get(byte networkId, byte thingId) { Thing thing = allThings.Find(aThing => aThing.networkId == networkId && aThing.id == thingId); return thing; } } }