// Update is called once per frame void Update() { if (gameManager.matchInfo.fase.Equals(GameFase.Attack)) { foreach (Touch touch in Input.touches) { if (touch.phase == TouchPhase.Began) { RaycastHit hitInfo; // Construct a ray from the current touch coordinates Ray ray = Camera.main.ScreenPointToRay(touch.position); if (Physics.Raycast(ray, out hitInfo, 100, countryLayerMask)) { Debug.Log(hitInfo); if (selectedCountry == null) { selectedCountry = hitInfo.collider.gameObject.GetComponent <CountryBehaviour>(); } else { focusCountry = hitInfo.collider.gameObject.GetComponent <CountryBehaviour>(); } } } } } }
public void LoseCountry(CountryBehaviour country) { countries.Remove(country); }
public void AddCountry(CountryBehaviour country) { countries.Add(country); }