mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
更新Entity接口 泛型获取父级、Define增加unit[]类型
更新Entity接口 泛型获取父级、Define增加unit[]类型
This commit is contained in:
@@ -450,6 +450,11 @@ namespace TEngine
|
||||
#endif
|
||||
|
||||
#region GetComponent
|
||||
public T GetParent<T>() where T : Entity, new()
|
||||
{
|
||||
return (T)Parent;
|
||||
}
|
||||
|
||||
public T GetComponent<T>() where T : Entity, new()
|
||||
{
|
||||
return GetComponent(typeof(T)) as T;
|
||||
|
Reference in New Issue
Block a user