BBGamelib.CCActionManager.removeActionByTag C# (CSharp) Method

removeActionByTag() public method

public removeActionByTag ( int aTag, System target ) : void
aTag int
target System
return void
		public void removeActionByTag(int aTag, System.Object target){
			NSUtils.Assert (aTag != CCAction.kCCActionTagInvalid, "Invalid tag");	
			NSUtils.Assert (target != null, "Target should be null !");
			
			tHashElement element = _targets.HASH_FIND_INT (target.GetHashCode());
			if (element != null) {
				if(element.actions!=null){
					int limit = element.actions.Count;
					for(int i=0; i<limit; i++){
						CCAction a = element.actions[i];
						if(a.tag == aTag && a.originalTarget == target){
							removeActionAtIndex(i, element);
							break;
						}
					}
				}
			}
		}
		#endregion

Usage Example

 /** Removes an action from the running action list given its tag
  * @since v0.7.1
  */
 public void stopActionByTag(int aTag)
 {
     NSUtils.Assert(aTag != CCAction.kCCActionTagInvalid, "Invalid tag");
     _actionManager.removeActionByTag(aTag, this);
 }