예제 #1
0
 // Use this for initialization
 void Start()
 {
     this.soundSys                = GameObject.FindObjectOfType <PhysicsSoundSystem>();
     this.audioSource             = this.gameObject.GetComponent <AudioSource>();
     audioSource.volume           = 0.6f;
     this.audioSource.playOnAwake = false;
     filter = gameObject.AddComponent <AudioLowPassFilter>();
     filter.cutoffFrequency = 1000;
 }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        this.soundSys = GameObject.FindObjectOfType <PhysicsSoundSystem>();
        var audioStuff = new GameObject();

        audioStuff.transform.parent = this.transform;
        this.audioSource            = audioStuff.AddComponent <AudioSource>();
        //audioSource.volume = 0.6f;
        this.audioSource.playOnAwake = false;
        filter = audioStuff.AddComponent <AudioLowPassFilter>();
        filter.cutoffFrequency = 1000;
        this.rb = gameObject.GetComponent <Rigidbody>();
    }
예제 #3
0
 void Awake()
 {
     instance = this;
 }