//void OnTriggerEnter2D(Collider2D other) { // //Debug.Log ("Enemy OnTriggerEnter2D : " + other.name); // if (other.tag == "PlayerArm") { // AnimatorStateInfo stateInfo = playerAnim.GetCurrentAnimatorStateInfo(0); // if (attackHash != stateInfo.fullPathHash) { // attackHash = stateInfo.fullPathHash; // enemyCtrl.ActionDamage (); // } // } else // if (other.tag == "PlayerArmBullet") { // Destroy (other.gameObject); // enemyCtrl.ActionDamage (); // } //} void OnTriggerEnter2D(Collider2D other) { //Debug.Log ("Enemy OnTriggerEnter2D : " + other.name); if (other.tag == "PlayerArm") { enemyCtrl.ActionDamage(); playsound(); } else if (other.tag == "PlayerArmBullet") { Destroy(other.gameObject); enemyCtrl.ActionDamage(); playsound(); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "PlayerArm") { AnimatorStateInfo stateInfo = playerAnim.GetCurrentAnimatorStateInfo(0); if (attackHash != stateInfo.nameHash) { attackHash = stateInfo.nameHash; enemyCtrl.ActionDamage(); Camera.main.GetComponent <CameraFollow>().AddCameraSize(-0.01f, -0.3f); } } else if (other.tag == "PlayerArmBullet") { Destroy(other.gameObject); enemyCtrl.ActionDamage(); } }
void OnTriggerEnter2D(Collider2D other) { //Debug.Log ("Enemy OnTriggerEnter2D : " + other.name); if (other.tag == "PlayerArm") { AnimatorStateInfo stateInfo = playerAnim.GetCurrentAnimatorStateInfo(0); if (attackHash != stateInfo.nameHash) { attackHash = stateInfo.nameHash; enemyCtrl.ActionDamage(); } } else if (other.tag == "PlayerArmBullet") { Destroy(other.gameObject); enemyCtrl.ActionDamage(); } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "PlayerArm") { AnimatorStateInfo stateInfo = playerAnim.GetCurrentAnimatorStateInfo(0); if (attackHash != stateInfo.fullPathHash) { attackHash = stateInfo.fullPathHash; enemyCtrl.ActionDamage(); enemyCtrl.NockBack(playerCtrl.attackNockBackVector); } } }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "PlayerArm") { AnimatorStateInfo stateInfo = playerAnim.GetCurrentAnimatorStateInfo(0); if (attackHash != stateInfo.fullPathHash) { attackHash = stateInfo.fullPathHash; enemyCtrl.ActionDamage(); enemyCtrl.NockBack ( playerStatusManager.attackNockBackVector, playerStatusManager.isSmash, playerStatusManager.isLastAttack, playerStatusManager.nockBackTimer ); enemyCtrl.expGain = playerStatusManager.GetExp(); playerStatusManager.GetSmash(); } } }