Exemple #1
0
    // ------------------------------------------------------------------
    /// Force refresh all layers. This is called by ex2D.
    // ------------------------------------------------------------------

    public void ForceRenderScene()
    {
        for (int i = 0; i < layerList.Count; ++i)
        {
            exLayer layer = layerList[i];
            if (layer != null)
            {
                layer.DestroyMeshes();
                layer.GenerateMeshes();
            }
        }
        ResortLayerDepth();
        UpdateLayers();
    }
Exemple #2
0
    // ------------------------------------------------------------------
    // Desc:
    // ------------------------------------------------------------------

    void OnDisable()
    {
#if EX_DEBUG
        Debug.Log("Disable 2D Renderer");
#endif
        for (int i = 0; i < layerList.Count; ++i)
        {
            exLayer layer = layerList[i];
            if (layer != null)
            {
                layer.DestroyMeshes();
            }
        }
        if (ReferenceEquals(this, instance_))
        {
            instance_ = null;
        }
    }