コード例 #1
0
    void Die()
    {
        Destroy(gameObject);
        GameObject explode = Instantiate(boom, transform.position, Quaternion.identity) as GameObject;

        explode.rigidbody2D.velocity = new Vector3(0, -2, 0);
        scoreKeep.ScoreKeep();
        AudioSource.PlayClipAtPoint(explosion, transform.position);
    }