protected override void init(System.Object aDelegate, int aPriority) { base.init(aDelegate, aPriority); if (NSUtils.hasMethod(aDelegate, "ccTouchesBegan")) { _enabledSelectors |= kCCTouchSelectorFlag.BeganBit; } if (NSUtils.hasMethod(aDelegate, "ccTouchesMoved")) { _enabledSelectors |= kCCTouchSelectorFlag.MovedBit; } if (NSUtils.hasMethod(aDelegate, "ccTouchesEnded")) { _enabledSelectors |= kCCTouchSelectorFlag.EndedBit; } if (NSUtils.hasMethod(aDelegate, "ccTouchesCancelled")) { _enabledSelectors |= kCCTouchSelectorFlag.CancelledBit; } }
/** initializes a TargetedTouchHandler with a delegate, a priority and whether or not it swallows touches or not */ public void init(System.Object aDelegate, int priority, bool swallowsTouches) { _claimedTouches = new HashSet <UITouch> (); _swallowsTouches = swallowsTouches; if (NSUtils.hasMethod(aDelegate, "ccTouchBegan")) { _enabledSelectors |= kCCTouchSelectorFlag.BeganBit; } if (NSUtils.hasMethod(aDelegate, "ccTouchMoved")) { _enabledSelectors |= kCCTouchSelectorFlag.MovedBit; } if (NSUtils.hasMethod(aDelegate, "ccTouchEnded")) { _enabledSelectors |= kCCTouchSelectorFlag.EndedBit; } if (NSUtils.hasMethod(aDelegate, "ccTouchCancelled")) { _enabledSelectors |= kCCTouchSelectorFlag.CancelledBit; } }