public void AddInstance(ImpostorInstanceData data)
 {
     data.Batch = this;
     if (this.recycle.Count <= 0)
     {
         data.BatchIndex = this.Positions.Count;
         this.Positions.Add(data.PositionAndScale());
         return;
     }
     data.BatchIndex = this.recycle.Dequeue();
     this.Positions[data.BatchIndex] = data.PositionAndScale();
 }
Ejemplo n.º 2
0
 public void AddInstance(ImpostorInstanceData data)
 {
     data.Batch = this;
     if (recycle.Count > 0)
     {
         data.BatchIndex            = recycle.Dequeue();
         Positions[data.BatchIndex] = data.PositionAndScale();
     }
     else
     {
         data.BatchIndex = Positions.Count;
         Positions.Add(data.PositionAndScale());
     }
 }