コード例 #1
0
    // Request to play the given AmbientClip
    public static void Play(AmbientClip clip)
    {
        GetLocal();
        AmbientTrigger at = clip.bounds.gameObject.AddComponent <AmbientTrigger>();

        at.ac = clip;
    }
コード例 #2
0
 void Start()
 {
     collider = GetComponent <Collider2D>();
     player   = GameObject.FindGameObjectWithTag("Player").GetComponent <Collider2D>();
     if (ac == null)
     {
         ac = new AmbientClip(clipName, collider, rolloff);
     }
 }