Example #1
0
 public bool HasBehavior(Behavior bh)
 {
     return(m_aBehaviors.Contains(bh));
 }
Example #2
0
 public void RemoveBehavior(Behavior bh)
 {
     m_aBehaviors.Remove(bh);
     //TODO if (.Disposed == false), dispose it!
 }
Example #3
0
 public void RemoveBehavior(Behavior bh)
 {
     m_aBehaviors.Remove(bh);
     //TODO if (.Disposed == false), dispose it!
 }
Example #4
0
 //TODO: I want to move these methods out to a BehaviorCollection, but I have to read about creating such classes first.
 //This is true for many collections throughout the project. Important: the owner of such a collection must be notified about adds/removes
 public void AddBehavior(Behavior bh)
 {
     m_aBehaviors.Add(bh);
     if (bh.Sprite != this)
         bh.Sprite = this;
 }
Example #5
0
 public bool HasBehavior(Behavior bh)
 {
     return m_aBehaviors.Contains(bh);
 }