private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Goal") { uiControl.EndGame(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Goal")) { Debug.Log("Level Cleared!"); UIControl.EndGame("LEVEL CLEAR!", Color.green); } }
public void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Goal") { Debug.Log("Kena"); uiController.EndGame(); } }
private void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Goal")) { Debug.Log("Level clear"); Destroy(gameObject); uiControl.EndGame(); } }
public void EndGame() { for (int i = 0; i < playersCount; i++) { players [i].transform.Find("Tank controller").SendMessage("DeactivateHud"); } Time.timeScale = 0.0f; uics.EndGame(); }
public void OnTriggerExit2D(Collider2D collision) { //if (isPulled || isCrashed) return; if (collision.gameObject.CompareTag("Goal") && !isCrashed) { uiControl.EndGame(); } if (collision.gameObject.CompareTag("Tower")) { closestTower = null; //Change tower color back to normal collision.gameObject.GetComponent <SpriteRenderer>().color = baseColor; } }
void EndGame() { GameObject.FindGameObjectWithTag("Level").GetComponent <AudioSource> ().Stop(); Time.timeScale = 0.0f; uics.EndGame(); }