PlayerSound.cs 572 Bytes
Newer Older
1
2
3
4
5
6
7
8
using UnityEngine;

public class PlayerSound : MonoBehaviour {
    public static PlayerSound instance;

    //LIGHT
    private Light light_self;
    public bool use_mic = false;
9

10
11
12
13
14
15
16
17
18
    // Use this for initialization
    void Start () {
        instance = this;
        light_self = GetComponentInChildren<Light> ();
    }

    // Update is called once per frame
    void Update () {
        if (use_mic && this.gameObject.tag == "Player") {
19
            light_self.spotAngle = AM.i.GetLightAngle ();
20
            light_self.color = AM.i.GetLightColor ();
21
22
23
        }
    }
}