void OnAttack(Transform enemy) { No_Move_Enermy enermyMove = enemy.GetComponent <No_Move_Enermy>(); enermyMove.OnDamage(); Destroybook(); }
void OnAttack(Transform enemy) { //밟았을때 반발력 rigid2D.AddForce(Vector2.up * 5, ForceMode2D.Impulse); gameManager.stagePoint += 100; //포인트 추가 //밟힌 몬스터 제거 No_Move_Enermy enermyMove = enemy.GetComponent <No_Move_Enermy>(); enermyMove.OnDamage(); }