CoinTimeGame.Entities.Button.HandleTouchesBegan C# (CSharp) Method

HandleTouchesBegan() private method

private HandleTouchesBegan ( List touches, CocosSharp.CCEvent touchEvent ) : void
touches List
touchEvent CocosSharp.CCEvent
return void
		private void HandleTouchesBegan(List<CCTouch> touches, CCEvent touchEvent)
		{
			if (this.Visible)
			{
				// did the user actually click within the CCSprite bounds?
				var firstTouch = touches.FirstOrDefault ();

				if (firstTouch != null)
				{
				
					bool isTouchInside = sprite.BoundingBoxTransformedToWorld.ContainsPoint (firstTouch.Location);

					if (isTouchInside && Clicked != null)
					{
						Clicked (this, null);
					}
				}
			}
		}