Exemplo n.º 1
0
    public virtual bool Raycast(Vector2 sp, Camera eventCamera)
    {
        RectTransform transform = ((Component)this).get_transform() as RectTransform;
        Rect          rect      = transform.get_rect();
        float         num       = KuroObi.CalcObiSize();
        Vector2       vector2;

        RectTransformUtility.ScreenPointToLocalPointInRectangle(transform, sp, (Camera)null, ref vector2);
        // ISSUE: explicit reference operation
        // ISSUE: explicit reference operation
        return(vector2.y < (double)((Rect)@rect).get_yMin() + (double)num || (double)((Rect)@rect).get_yMax() - (double)num < vector2.y);
    }
Exemplo n.º 2
0
    protected virtual void OnPopulateMesh(VertexHelper vh)
    {
        vh.Clear();
        Color32  color32  = Color32.op_Implicit(this.get_color());
        Rect     rect     = (((Component)this).get_transform() as RectTransform).get_rect();
        UIVertex uiVertex = (UIVertex)null;
        float    num1     = KuroObi.CalcObiSize();

        // ISSUE: explicit reference operation
        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMin(), ((Rect)@rect).get_yMax()));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
        // ISSUE: explicit reference operation
        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMax(), ((Rect)@rect).get_yMax()));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
        // ISSUE: explicit reference operation
        float num2 = ((Rect)@rect).get_yMax() - num1;

        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMax(), num2));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMin(), num2));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
        // ISSUE: explicit reference operation
        float num3 = ((Rect)@rect).get_yMin() + num1;

        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMin(), num3));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMax(), num3));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
        // ISSUE: explicit reference operation
        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMax(), ((Rect)@rect).get_yMin()));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
        // ISSUE: explicit reference operation
        // ISSUE: explicit reference operation
        uiVertex.position = (__Null)Vector2.op_Implicit(new Vector2(((Rect)@rect).get_xMin(), ((Rect)@rect).get_yMin()));
        uiVertex.color    = (__Null)color32;
        vh.AddVert(uiVertex);
    }