mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新Entity接口 泛型获取父级、Define增加unit[]类型
更新Entity接口 泛型获取父级、Define增加unit[]类型
This commit is contained in:
@@ -80,7 +80,7 @@ public static class Define
|
|||||||
{
|
{
|
||||||
"", "0", "bool", "byte", "short", "ushort", "int", "uint", "long", "ulong", "float", "string", "AttrConfig",
|
"", "0", "bool", "byte", "short", "ushort", "int", "uint", "long", "ulong", "float", "string", "AttrConfig",
|
||||||
"IntDictionaryConfig", "StringDictionaryConfig",
|
"IntDictionaryConfig", "StringDictionaryConfig",
|
||||||
"short[]", "int[]", "long[]", "float[]", "string[]"
|
"short[]", "int[]", "long[]", "float[]", "string[]","uint[]"
|
||||||
};
|
};
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Excel生成代码模板的位置
|
/// Excel生成代码模板的位置
|
||||||
|
@@ -450,6 +450,11 @@ namespace TEngine
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#region GetComponent
|
#region GetComponent
|
||||||
|
public T GetParent<T>() where T : Entity, new()
|
||||||
|
{
|
||||||
|
return (T)Parent;
|
||||||
|
}
|
||||||
|
|
||||||
public T GetComponent<T>() where T : Entity, new()
|
public T GetComponent<T>() where T : Entity, new()
|
||||||
{
|
{
|
||||||
return GetComponent(typeof(T)) as T;
|
return GetComponent(typeof(T)) as T;
|
||||||
|
Reference in New Issue
Block a user