コード例 #1
0
    //----------------------------------------------------------------------
    //
    //----------------------------------------------------------------------
    void OnTriggerEnter(Collider c)
    {
        if (c.tag != "Enemy")
        {
            return;
        }

        //	破壊演出
        if (m_state == State.Just)
        {
            SoundManager.Play("justSE");
            GameObject.Find("Effecter").GetComponent <Effecter>().SetP1(transform.position);
            m_gloval.g_slowFlg = true;
            return;
        }

        m_camera.SetShake(20, .5f, .5f, .5f);
        SoundManager.Play("damageSE", 0.5f);


        if (m_curHP > 0)
        {
            m_curHP--;
            Destroy(m_hps[m_curHP]);
        }

        //Debug.Log("衝突瞬間");
    }