예제 #1
0
    private PowerupBumpAudio bumpAudio; // connection - auto: the sibling Powerup Bump Audio



    // updating //


    // before the start: //
    private void Awake()
    {
        // connect to the parent Powerup //
        powerup = transform.parent.GetComponent <Powerup>();

        // connect to the sibling Powerup Bump Audio //
        bumpAudio = powerup.GetComponentInChildren <PowerupBumpAudio>();
    }
예제 #2
0
    // updating //


    // before the start: //
    protected virtual void Awake()
    {
        // connect to the child Powerup Bump Audio and track the original name of the Powerup Bump Audio's object //
        bumpAudio             = firstLodal <PowerupBumpAudio>();
        originalBumpAudioName = bumpAudio.name;

        // connect to the child Powerup Pickup Audio and track the original name of the Powerup Pickup Audio's object //
        pickupAudio             = firstLodal <PowerupPickupAudio>();
        originalPickupAudioName = pickupAudio.name;
    }