Пример #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Enemy" || other.tag == "KnockedEnemy")
     {
         playerControl.killer = true;
         float direction = transform.parent.localScale.x;
         camEffect.CameraKnock(cameraKnockDuration, cameraKnockDistance, new Vector3(direction, 0f, 0f));
         Vector2 force = new Vector2(enemyKnockMult * 10 * chargeAmt * direction, 0f);
         other.gameObject.GetComponent <Enemy>().KnockBack(force);
         //playerControl.Invoke("StopDash", 0.2f);
         playerControl.StopDash();
     }
 }