Class ListStack<GameObject>
Inheritance
System.Object
ListStack<GameObject>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GameKit.Dependencies.Utilities.ObjectPooling
Assembly: GameKit.Dependencies.dll
Syntax
public class ListStack<GameObject>
Type Parameters
Name | Description |
---|---|
GameObject |
Constructors
ListStack()
Declaration
public ListStack()
Properties
Count
Number of entries within the stack.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Entries
Entries within this ListStack.
Declaration
public List<GameObject> Entries { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<GameObject> |
EntriesAddedTimes
Time an entry was added. Indexes will always match up with Entries.
Declaration
public List<float> EntriesAddedTimes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Single> |
Methods
AccessedRecently(Single)
Returns if this ListStack has been accessed recently.
Declaration
public bool AccessedRecently(float threshold)
Parameters
Type | Name | Description |
---|---|---|
System.Single | threshold |
Returns
Type | Description |
---|---|
System.Boolean |
Clear()
Clears the stack; does not destroy items within the stack.
Declaration
public void Clear()
Cull(Single)
Returns a list of GameObjects which were culled from the stack.
Declaration
public List<GameObject> Cull(float threshold)
Parameters
Type | Name | Description |
---|---|---|
System.Single | threshold |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<GameObject> |
Pop()
Pop an item from the stack.
Declaration
public GameObject Pop()
Returns
Type | Description |
---|---|
GameObject |
Push(GameObject)
Push an item to the stack.
Declaration
public void Push(GameObject item)
Parameters
Type | Name | Description |
---|---|---|
GameObject | item |
Remove(GameObject)
Attempts to remove an item from the entries.
Declaration
public bool Remove(GameObject item)
Parameters
Type | Name | Description |
---|---|---|
GameObject | item |
Returns
Type | Description |
---|---|
System.Boolean | True if an item was removed. |
Remove(Int32)
Remove an entry at a specified index.
Declaration
public void Remove(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |