Пример #1
0
    //*************************************************************************************************************************************************
    //Play sound
    void OnCollisionStay(Collision col)
    {
        int rndPainsnd = Random.Range(0, 3); AudioClip painSnd = null;

        switch (rndPainsnd)
        {
        case 0: painSnd = Ammo1; break;

        case 1: painSnd = Ammo2; break;

        case 2: painSnd = Ammo3; break;
        }
        shared.ManageCollision(col, 0.0f, 0.0f, source, painSnd, Hit_jaw, Hit_head, Hit_tail);
    }
Пример #2
0
    //*************************************************************************************************************************************************
    //Play sound
    void OnCollisionStay(Collision col)
    {
        int rndPainsnd = Random.Range(0, 4); AudioClip painSnd = null;

        switch (rndPainsnd)
        {
        case 0: painSnd = Comp1; break;

        case 1: painSnd = Comp2; break;

        case 2: painSnd = Comp3; break;

        case 3: painSnd = Comp4; break;
        }
        shared.ManageCollision(col, MAXPITCH, MAXCROUCH, source, painSnd, Hit_jaw, Hit_head, Hit_tail);
    }