示例#1
0
    // ===========================================================
    // Methods for/from SuperClass/Interfaces
    // ===========================================================

    // ===========================================================
    // Methods
    // ===========================================================

    void OnEnable() {
        if (drawCall == null) {
            drawCall = MadDrawCall.Create();
            drawCall.gameObject.layer = gameObject.layer;

            MadTransform.SetLocalScale(drawCall.transform, transform.lossyScale);
        }

        panel = GetComponent<MadPanel>();

        if (drawCall != null) {
            MadGameObject.SetActive(drawCall.gameObject, true);
        }
    }
示例#2
0
    // ===========================================================
    // Methods for/from SuperClass/Interfaces
    // ===========================================================

    // ===========================================================
    // Methods
    // ===========================================================

    void OnEnable()
    {
        if (drawCall == null)
        {
            drawCall = MadDrawCall.Create();
            drawCall.gameObject.layer = gameObject.layer;

            MadTransform.SetLocalScale(drawCall.transform, transform.lossyScale);
        }

        panel = GetComponent <MadPanel>();

        if (drawCall != null)
        {
            MadGameObject.SetActive(drawCall.gameObject, true);
        }
    }
示例#3
0
    private MadDrawCall NextDrawCall()
    {
        MadDrawCall drawCall;

        if (nextDrawCall >= drawCalls.Count)
        {
            // create new draw call
            drawCall = MadDrawCall.Create();
            drawCall.gameObject.layer = gameObject.layer;

            MadTransform.SetLocalScale(drawCall.transform, transform.lossyScale);
            drawCalls.Add(drawCall);
            nextDrawCall++;
        }
        else
        {
            drawCall = drawCalls[nextDrawCall++];
            MadGameObject.SetActive(drawCall.gameObject, true);
        }

        return(drawCall);
    }