Example #1
0
 void OnTriggerEnter2D(Collider2D Col)
 {
     if (Col.CompareTag("Lifepoint") && Anim.GetBool("Attack"))
     {
         Character1.MinusHp();
     }
 }
Example #2
0
 void OnTriggerEnter2D(Collider2D Collider)
 {
     if (Collider.CompareTag("Lifepoint"))
     {
         Character1.MinusHp(Dmg);
         Player.GetComponent <Character1>().DragStart(transform.position);
     }
 }
Example #3
0
 void OnTriggerExit2D(Collider2D col)
 {
     if (col.CompareTag("Lifepoint"))
     {
         Character1.MinusHp(damage);
         StartCoroutine(player.GetComponent <Character1>().Drag(transform.position));
     }
 }
Example #4
0
 void OnTriggerExit2D(Collider2D col)
 {
     if (col.CompareTag("Lifepoint") && Anim.GetBool("Attack"))
     {
         Character1.MinusHp(20);
         StartCoroutine(Player.GetComponent <Character1>().Drag(transform.position));
     }
 }
Example #5
0
 private void Update()
 {
     if (HeroIsHere && Damage)
     {
         StartCoroutine(GameObject.FindGameObjectWithTag("Player").GetComponent <Character1>().Drag(transform.position));
         Character1.MinusHp(15);
     }
 }
Example #6
0
 void OnTriggerStay2D(Collider2D Col)
 {
     if (Col.CompareTag("Player") && Damage)
     {
         Character1.Alert();
         Character1.MinusHp();
     }
 }
Example #7
0
 // 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);
     }
 }
Example #8
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.CompareTag("Player") && !ignore)
     {
         StartCoroutine(Player.GetComponent <Character1>().Drag(transform.position));
         Character1.MinusHp(25);
         ignore = false;
     }
 }
Example #9
0
 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;
     }
 }