using System.Collections.Generic; namespace Impostor.Server.Net.Inner { internal class GameObject { public GameObject() { Components = new List(); } protected List Components { get; } public List GetComponentsInChildren() { var result = new List(); foreach (var component in Components) { if (component is T c) { result.Add(c); } } return result; } } }