public void AddSubSubject(GameObject go)
 {
     if (this.subSubjects == null)
     {
         this.subSubjects = new EZLinkedList <EZLinkedListNode <GameObject> >();
     }
     this.subSubjects.Add(new EZLinkedListNode <GameObject>(go));
 }
    public EZLinkedListNode <EZAnimation> AddRunningAnim()
    {
        if (this.runningAnims == null)
        {
            this.runningAnims = new EZLinkedList <EZLinkedListNode <EZAnimation> >();
            if (this.idleAnims == null)
            {
                this.idleAnims = new EZLinkedList <EZLinkedListNode <EZAnimation> >();
            }
        }
        EZLinkedListNode <EZAnimation> eZLinkedListNode;

        if (this.idleAnims.Count > 0)
        {
            eZLinkedListNode = this.idleAnims.Head;
            this.idleAnims.Remove(eZLinkedListNode);
        }
        else
        {
            eZLinkedListNode = new EZLinkedListNode <EZAnimation>(null);
        }
        this.runningAnims.Add(eZLinkedListNode);
        return(eZLinkedListNode);
    }
 public bool Begin(EZLinkedList <T> l)
 {
     this.list = l;
     this.cur  = l.Head;
     return(this.cur == null);
 }
 public EZTransition(string n)
 {
     this.name         = n;
     this.runningAnims = null;
 }
Esempio n. 5
0
	// Helper method that removes a pointer listener from a list:
	protected void RemovePtrListener(EZLinkedList<EZLinkedListNode<PointerInfoDelegate>> list, PointerInfoDelegate del)
	{
		for (EZLinkedListIterator<EZLinkedListNode<PointerInfoDelegate>> i = list.Begin(); !i.Done; i.Next())
		{
			if (i.Current.val == del)
			{
				// Save it:
				EZLinkedListNode<PointerInfoDelegate> node = i.Current;

				// Remove it from the active list:
				list.Remove(i.Current);

				// Add it to our free pool:
				listenerPool.Add(node);

				// We're done.
				i.End();
				break;
			}
		}
	}