blob: 9b53d708f6851e0f7e25fbc2ec505c1f4440f404 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using System.Collections.Generic;
namespace Impostor.Server.Net.Inner
{
internal class GameObject
{
public GameObject()
{
Components = new List<object>();
}
protected List<object> Components { get; }
public List<T> GetComponentsInChildren<T>()
{
var result = new List<T>();
foreach (var component in Components)
{
if (component is T c)
{
result.Add(c);
}
}
return result;
}
}
}
|