private void OnMouseDown() { foreach (DefenderButton button in buttons) { button.GetComponent <SpriteRenderer>().color = new Color32(77, 77, 77, 255); } spriteRenderer.color = Color.white; defenderSpawner.SetSelectedDefender(defenderPrefab); }
private void OnMouseDown() { foreach (var button in _buttons) { button.SpriteRenderer.color = defaultColor; } spriteRenderer.color = Color.white; _defenderSpawner.SetSelectedDefender(defenderPrefab); }
private void OnMouseDown() { foreach (var defenderButton in FindObjectsOfType <DefenderButton>()) { defenderButton.GetComponent <SpriteRenderer>().color = new Color32(102, 102, 102, 255); } GetComponent <SpriteRenderer>().color = Color.white; defenderSpawner.SetSelectedDefender(defenderPrefab); }
private void OnMouseDown() { foreach (DefenderButton button in defenderButtons) { button.spriteRenderer.color = new Color32(41, 41, 41, 255); } spriteRenderer.color = Color.white; defenderSpawner.SetSelectedDefender(defenderPrefab); }
private void OnMouseDown() { for (int i = 0; i < renderers.Length; i++) { renderers[i].color = grayed; } thisRenderer.color = white; defenderSpawner.SetSelectedDefender(defenderPrefab); }
// Define evento do mouse private void OnMouseDown() { // Reseta cor foreach (DefenderButton button in buttons) { button.spriteRenderer.color = defaultButtonColor; } spriteRenderer.color = Color.white; defenderSpawner.SetSelectedDefender(defenderPrefab); }
private void OnMouseDown() { var buttons = FindObjectsOfType <DefenderButton>(); foreach (DefenderButton button in buttons) { button.GetComponent <SpriteRenderer>().color = Color.gray; } gameObject.GetComponent <SpriteRenderer>().color = Color.white; defenderSpawner.SetSelectedDefender(defenderPrefab); }
void OnMouseDown() { var buttons = FindObjectsOfType <DefenderButton>(); foreach (var button in buttons) { button.GetComponent <SpriteRenderer>().color = new Color32(84, 84, 84, 255); } spriteRenderer.color = Color.white; defenderSpawner.SetSelectedDefender(defenderPrefab); }
private void OnMouseDown() { if (!LevelController.gameOver && !LevelController.gamePaused) { DefendersButtons.ResetButtons(); spriteRenderer.color = Color.white; DefenderSpawner.SetSelectedDefender(defenderPrefab); // Play Sound AudioSource.PlayClipAtPoint(sounds.GetClip(0), transform.localPosition, PlayerPrefsController.GetMasterVolume()); } }
private void OnMouseDown() { var buttons = FindObjectsOfType <DefenderButton>(); foreach (DefenderButton button in buttons) { button.GetComponent <SpriteRenderer>().color = new Color32(144, 111, 111, 255); } GetComponent <SpriteRenderer>().color = Color.white; DefenderSpawner ds = FindObjectOfType <DefenderSpawner>(); //Debug.Log("Defender Spawner found! ds == null? " + ds == null); ds.SetSelectedDefender(defenderPrefab); }
private void OnMouseDown() { if (!spriteRender) { return; } var buttons = FindObjectsOfType <DefenderButton>(); foreach (DefenderButton button in buttons) { button.GetComponent <SpriteRenderer>().color = new Color32(75, 75, 75, 255); } spriteRender.color = Color.white; spawner.SetSelectedDefender(defenderPrefab); }
public void OnMouseDown() { if (!levelController.IsPaused()) { // Only allow us to click the button if we have enough stars for it. if (sunDisplay.HaveEnoughSuns(cost)) { ResetDisplay(); spriteRenderer.color = Color.white; defenderSpawner.SetSelectedDefender(defenderPrefab); isClicked = true; } } }