Пример #1
0
    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;
    }
Пример #2
0
 void Awake()
 {
     controller = GameObject.FindWithTag("GameController");
     logRecCtrl = controller.GetComponent <LogRecodeController> ();
 }