少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-16 12db36c3c9a072f8383597a2cba73c908a1a0fba
Utility/TransformExtension.cs
@@ -2,9 +2,11 @@
using System.Collections;
using System.Collections.Generic;
[XLua.LuaCallCSharp]
public static class TransformExtension
{
    [XLua.LuaCallCSharp]
    public static void SetParentEx(this Transform transform, Transform parent, Vector3 localPosition, Quaternion rotation, Vector3 scale)
    {
@@ -17,6 +19,7 @@
        }
    }
    [XLua.LuaCallCSharp]
    public static void SetParentEx(this Transform transform, Transform parent, Vector3 localPosition, Vector3 eulerAngles, Vector3 scale)
    {
        if (transform != null && parent != null)
@@ -27,7 +30,6 @@
            transform.localScale = scale;
        }
    }
    public static T[] GetComponentsInChildren<T>(this Transform transform, bool includeInactive, bool includeSelf) where T : Component
    {
@@ -54,6 +56,7 @@
    }
    [XLua.LuaCallCSharp]
    public static Transform GetChildTransformDeeply(this Transform transform, string childName, bool includeSelf = false)
    {
@@ -95,6 +98,7 @@
    /// </summary>
    /// <param name="_child"></param>
    /// <param name="_parent"></param>
    [XLua.LuaCallCSharp]
    public static void MatchWhith(this RectTransform _child, RectTransform _parent)
    {
@@ -111,7 +115,7 @@
        _child.localScale = Vector3.one;
    }
    [XLua.LuaCallCSharp]
    public static bool ContainWorldPosition(this RectTransform _rectTransform, Vector3 _worldPosition)
    {
        var worldCorners = new Vector3[4];
@@ -125,6 +129,7 @@
        return false;
    }
    [XLua.LuaCallCSharp]
    public static bool RectTransformContain(this RectTransform _rectTransform, RectTransform _target)
    {
        var targetWorldCorners = new Vector3[4];