コード例 #1
0
    public void GoBerserk()
    {
        if (powerUp != null)
        {
            powerUp.UsePowerUp(this);


            if (blastSound != null && powerUp is DoPowerBlast)
            {
                AudioSource.PlayClipAtPoint(blastSound, transform.position);
            }
            if (healthSound != null && powerUp is PowerBirdSpawn)
            {
                AudioSource.PlayClipAtPoint(healthSound, transform.position);
            }
            if (slowSound != null && powerUp is PowerSlowMotion)
            {
                AudioSource.PlayClipAtPoint(slowSound, transform.position);
            }

            setPowerUp(null);
        }
    }