void Start() { MakeObjectSensor(); InitChangeBox(scriptKind); animator = this.GetComponent <Animator> (); GameObject controller = GameObject.FindWithTag("GameController"); logRecCtrl = controller.GetComponent <LogRecodeController> (); audioSource = controller.GetComponent <AudioSource>(); explosionSE = Resources.Load("crash28") as AudioClip; absorbSE = Resources.Load("open24") as AudioClip; outputSE = Resources.Load("open43") as AudioClip; }
void Awake() { controller = GameObject.FindWithTag("GameController"); logRecCtrl = controller.GetComponent <LogRecodeController> (); }