public void ShowHead(bool shouldShowHead) { if (_ctGraphicsSource == null) { _ctGraphicsSource = CTModel.GetComponent <PlayerGraphicsSource>(); } if (_tGraphicsSource == null) { _tGraphicsSource = TModel.GetComponent <PlayerGraphicsSource>(); } _ctGraphicsSource.Head.gameObject.SetActive(shouldShowHead); _tGraphicsSource.Head.gameObject.SetActive(shouldShowHead); }
public void EnsureCorrectPlayerModel(PartialPlayer player) { if (player.Team == Team.CounterTerrorist) { CTModel.SetActive(true); TModel.SetActive(false); if (_ctGraphicsSource == null) { _ctGraphicsSource = CTModel.GetComponent <PlayerGraphicsSource>(); } _currentPlayerGraphicsSource = _ctGraphicsSource; } else { CTModel.SetActive(false); TModel.SetActive(true); if (_tGraphicsSource == null) { _tGraphicsSource = TModel.GetComponent <PlayerGraphicsSource>(); } _currentPlayerGraphicsSource = _tGraphicsSource; } }