Ejemplo n.º 1
0
    // 弾との当たり判定
    private void OnCollisionEnter(Collision collision)
    {
        //if(!PauseScript.pause()){
        //if(!SkillManagement.GetTimeStop()){


        if (collision.gameObject.tag == "Bullet")
        {
            // 弾のダメージを取得
            dn.SetBulletDamage(collision.gameObject.GetComponent <BulletController>().Damage);

            eh.SetHitFlg(true);
            dn.SetHitFlg(true);
            foundflg = true;
            fireflg  = true;

            if (moveflg == false)
            {
                moveflg = true;
            }
            ep.hp -= collision.gameObject.GetComponent <BulletController>().Damage;
            if (ep.hp < 0)
            {
                ep.hp = 0;
            }
            //intパラメーターの値を設定する.
            animator.SetInteger("trans", trans);
        }

        //}
        //}
    }