BBGamelib.CCMenu.ccTouchBegan C# (CSharp) Method

ccTouchBegan() public method

public ccTouchBegan ( UITouch touch ) : bool
touch UITouch
return bool
		public override bool ccTouchBegan (UITouch touch)
		{
			if( _state != kCCMenuState.Waiting || !_visible || ! _enabled)
				return false;
			
			for( CCNode c = this.parent; c != null; c = c.parent )
				if( c.visible == false )
					return false;
			
			_selectedItem = itemForTouch(touch);
			
			if( _selectedItem!=null ) {
				_selectedItem.selected();
				_state = kCCMenuState.TrackingTouch;
				return true;
			}
			return false;
		}