Пример #1
0
    // what's happen when the player hull is hit by a bullet
    public void hullHit()
    {
        sound.playerHitSound(.5f); // play the destroy hull sound
        hull--;                    // decrement the hull value

        if (hull == 0)             // condition of death
        {
            Destroy(gameObject);   // this is maybe not the good way
        }
    }