示例#1
0
    public void Kill()
    {
        levelHandler.AddScore(points);
        levelHandler.DestroyTarget();

        Destroy(this.gameObject);
    }
示例#2
0
    private void Kill()
    {
        Instantiate(ParticlePrefab, transform.position, transform.rotation);
        GameObject sa = Instantiate(ScoreTextPrefab, transform.position, transform.rotation) as GameObject;

        sa.GetComponent <TextMesh>().text = score.ToString();

        levelhandler.AddScore(score);
        Destroy(this.gameObject);
    }