Bananas.PostGameMenu.TouchUpAtPoint C# (CSharp) Method

TouchUpAtPoint() public method

public TouchUpAtPoint ( CGPoint location ) : void
location CGPoint
return void
		public void TouchUpAtPoint (CGPoint location)
		{
			SKNode touchedNode = Scene.GetNodeAtPoint (location);

			if (touchedNode != null) {
				Hidden = true;
				GameSimulation.Sim.SetGameState (GameState.InGame);
			}
		}
	}

Usage Example

Example #1
0
        public void TouchUpAtPoint(CGPoint location)
        {
            if (gameState == GameState.Paused)
            {
                pauseNode.TouchUpAtPoint(location);
            }
            else if (gameState == GameState.PostGame)
            {
                postGameNode.TouchUpAtPoint(location);
            }
            else if (gameState == GameState.PreGame)
            {
                menuNode.TouchUpAtPoint(location);
            }
            else if (gameState == GameState.InGame)
            {
                SKNode touchedNode = Scene.GetNodeAtPoint(location);

                if (touchedNode == timeLabelValue)
                {
                    GameSimulation.Sim.SetGameState(GameState.Paused);
                }
            }
        }