Ejemplo n.º 1
0
 public CopyLayerInstance(MeshVert _parent, MeshFace _element, int copyLayerId = -1)
 {
     parent         = _parent;
     element        = _element;
     offsetPosition = Vector3.zero;
     copyLayer      = CopyLayerManager.GetLayer(copyLayerId);
     copyLayer.Add(this);
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Sets the next Layer up
    /// </summary>
    public static void GotoNextLayer()
    {
        if (currentLayer != null && currentLayer.Count() == 0)
        {
            return;
        }
        if (idQueue.Count == 0)
        {
            GenerateNewIds(100);
        }

        currentLayer = new CopyLayer(idQueue.Dequeue());
        Layers.Add(currentLayer);
    }
Ejemplo n.º 3
0
 /// <summary>
 /// Removes a Layer, requeuing it's id.
 /// </summary>
 /// <param name="copyLayer"></param>
 public static void RemoveLayer(CopyLayer copyLayer)
 {
     idQueue.Enqueue(copyLayer.id);
     Layers.Remove(copyLayer);
     copyLayer.RemoveInstances();
 }
Ejemplo n.º 4
0
 public void ChangeCopyLayer(int copyLayerId = -1)
 {
     copyLayer.RemoveInstance(this);
     copyLayer = CopyLayerManager.GetLayer(copyLayerId);
     copyLayer.Add(this);
 }