void OnTriggerEnter2D(Collider2D Col) { if (Col.CompareTag("Lifepoint") && Anim.GetBool("Attack")) { Character1.MinusHp(); } }
void OnTriggerEnter2D(Collider2D Collider) { if (Collider.CompareTag("Lifepoint")) { Character1.MinusHp(Dmg); Player.GetComponent <Character1>().DragStart(transform.position); } }
void OnTriggerExit2D(Collider2D col) { if (col.CompareTag("Lifepoint")) { Character1.MinusHp(damage); StartCoroutine(player.GetComponent <Character1>().Drag(transform.position)); } }
void OnTriggerExit2D(Collider2D col) { if (col.CompareTag("Lifepoint") && Anim.GetBool("Attack")) { Character1.MinusHp(20); StartCoroutine(Player.GetComponent <Character1>().Drag(transform.position)); } }
private void Update() { if (HeroIsHere && Damage) { StartCoroutine(GameObject.FindGameObjectWithTag("Player").GetComponent <Character1>().Drag(transform.position)); Character1.MinusHp(15); } }
void OnTriggerStay2D(Collider2D Col) { if (Col.CompareTag("Player") && Damage) { Character1.Alert(); Character1.MinusHp(); } }
// Start is called before the first frame update private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { StartCoroutine(GameObject.FindGameObjectWithTag("Player").GetComponent <Character1>().DragBack()); Character1.Alert(); Character1.MinusHp(15); } }
void OnTriggerEnter2D(Collider2D col) { if (col.CompareTag("Player") && !ignore) { StartCoroutine(Player.GetComponent <Character1>().Drag(transform.position)); Character1.MinusHp(25); ignore = false; } }
void OnTriggerEnter2D(Collider2D Col) { if (Col.CompareTag("Lifepoint") && CanDoDamage) { Character1.MinusHp(30); StartCoroutine(Player.GetComponent <Character1>().Drag(transform.position)); } if (Col.CompareTag("DamageForBoss") && CanDoDamage) { slider.GetComponent <Slider>().value = Lifes - 3; Lifes -= 3; //Phrases[bushes++].SetActive(true); StopAllCoroutines(); StartCoroutine(Bushed()); return; } }