private void CreateThinkingIndicator( ) { thinkingIndicator = ( GameObject )Instantiate(thinkingIndicatorResource); thinkingIndicator.name = "Thinking Indicator"; thinkingIndicator.transform.SetParent(uiHandler.transform, false); thinkingIndicatorHandler = thinkingIndicator.GetComponent <ThinkingIndicatorHandler>( ); if (Game.PlayerWhite.Intellegence == Player.PlayerIntellegenceNames.Computer) { Game.PlayerWhite.Brain.ThinkingBeginningEvent -= NoHandler; Game.PlayerWhite.Brain.ThinkingBeginningEvent += ComputerThinkingBeginningHandler; } else /* Game.PlayerBlack.Intellegence == Player.PlayerIntellegenceNames.Computer */ { Game.PlayerBlack.Brain.ThinkingBeginningEvent -= NoHandler; Game.PlayerBlack.Brain.ThinkingBeginningEvent += ComputerThinkingBeginningHandler; } }
private void CreateThinkingIndicator( ) { thinkingIndicator = ( GameObject ) Instantiate( thinkingIndicatorResource ); thinkingIndicator.name = "Thinking Indicator"; thinkingIndicator.transform.SetParent( uiHandler.transform, false ); thinkingIndicatorHandler = thinkingIndicator.GetComponent<ThinkingIndicatorHandler>( ); if( Game.PlayerWhite.Intellegence == Player.PlayerIntellegenceNames.Computer ) { Game.PlayerWhite.Brain.ThinkingBeginningEvent -= NoHandler; Game.PlayerWhite.Brain.ThinkingBeginningEvent += ComputerThinkingBeginningHandler; } else /* Game.PlayerBlack.Intellegence == Player.PlayerIntellegenceNames.Computer */ { Game.PlayerBlack.Brain.ThinkingBeginningEvent -= NoHandler; Game.PlayerBlack.Brain.ThinkingBeginningEvent += ComputerThinkingBeginningHandler; } }