コード例 #1
0
    void JustHit()
    {
        if (targetGO != null)
        {
            MonsterBehaviour mc = targetGO.GetComponent <MonsterBehaviour>();
            mc.GetDamage(damage);
        }

        if (particles != null)
        {
            GameObject ptl = Instantiate(particles, transform.position, transform.rotation);
            Destroy(ptl, 1f);
        }


        Destroy(gameObject);
    }