Ejemplo n.º 1
0
    protected void f(j A_0)
    {
        global::u.c("handleGetElementsBound" + A_0.c);
        ComponentField componentField = JsonParser.Deserialization <ComponentField>(A_0);
        GameObject     gameObject     = GameObjectManager.INSTANCE.FindGameObjectGlobal(componentField.instance);

        if (gameObject == null)
        {
            A_0.f = ResponseStatus.GAMEOBJ_NOT_EXIST;
        }
        else
        {
            try
            {
                object componentAttribute = ReflectionTools.GetComponentAttribute(gameObject, componentField.comopentName, componentField.attributeName);
                if (componentAttribute != null)
                {
                    A_0.b = componentAttribute.ToString();
                }
            }
            catch (Exception ex)
            {
                A_0.f = ResponseStatus.REFLECTION_ERROR;
                A_0.b = ex.Message;
            }
        }
        global::o.a(A_0);
    }
Ejemplo n.º 2
0
    public static Rectangle a(Camera A_0, GameObject A_1)
    {
        Vector3[] array = (Vector3[])ReflectionTools.GetComponentAttribute(A_1, global::x.ae, "worldCorners");
        if (array == null)
        {
            return(null);
        }
        if (A_0 == null)
        {
            global::u.b("NO Camera!");
            return(null);
        }
        Vector3 a_      = A_0.WorldToScreenPoint(array[0]);
        Vector3 vector  = A_0.WorldToScreenPoint(array[1]);
        Vector3 a_2     = A_0.WorldToScreenPoint(array[2]);
        Vector3 vector2 = A_0.WorldToScreenPoint(array[3]);
        float   height  = global::x.a(a_, vector);
        float   width   = global::x.a(vector, a_2);

        global::u.d(string.Concat(new object[]
        {
            "Screen Height = ",
            Screen.height,
            " Width = ",
            Screen.width
        }));
        Point point = new Point(vector.x, (float)Screen.height - vector.y);

        new Point(vector2.x, (float)Screen.height - vector2.y);
        return(new Rectangle(point.X, point.Y, width, height));
    }
Ejemplo n.º 3
0
    public static string e(GameObject A_0)
    {
        object componentAttribute = ReflectionTools.GetComponentAttribute(A_0, global::x.ag, "text");

        if (componentAttribute != null)
        {
            return((string)componentAttribute);
        }
        componentAttribute = ReflectionTools.GetComponentAttribute(A_0, global::x.ah, "value");
        if (componentAttribute != null)
        {
            return((string)componentAttribute);
        }
        return(null);
    }
Ejemplo n.º 4
0
    public static string c(GameObject A_0)
    {
        if (A_0 == null)
        {
            return(null);
        }
        object componentAttribute = ReflectionTools.GetComponentAttribute(A_0, global::x.ai, "mainTexture");

        if (componentAttribute != null)
        {
            Texture texture = (Texture)componentAttribute;
            return(texture.name);
        }
        object componentAttribute2 = ReflectionTools.GetComponentAttribute(A_0, global::x.aj, "spriteName");

        if (componentAttribute2 != null)
        {
            return((string)componentAttribute2);
        }
        return(null);
    }