private void LeftMouseClick() { GameObject hitObject = FindHitObject(); if (hitObject != null) { if (hitObject.GetComponent <ISelectAble>() != null && hitObject.tag == "Country") { if (_currentSelectedCountry != null) { _currentSelectedCountry.Deselect(); } Country country = hitObject.GetComponent <Country>(); country.Select(); _currentSelectedCountry = country; countryHandler.SetSelectedCountry(country); } } }
public void Select() { _isSelected = true; _countryHandler.SetSelectedCountry(this); _meshRenderer.material.color = _playerOwner.playerHighLightColor; }