Example #1
0
    protected ElementObject CreateNewObject()
    {
        ElementObject newPoolObject = new ElementObject();

        newPoolObject.instance = Instantiate(element);
        newPoolObject.inPool   = true;
        newPoolObject.instance.transform.SetParent(transform);
        newPoolObject.SetReferences();
        newPoolObject.Sleep();
        return(newPoolObject);
    }
Example #2
0
 public void Push(ElementObject element)
 {
     element.inPool = true;
     element.Sleep();
 }