Esempio n. 1
0
    public void OnStart()
    {
        GameObject panel = GameObject.GetGameObjectByName("PuzzleButton1").transform.GetChild(0).gameObject;

        panel1 = GetScript <BoobyTrapDeactivator>(panel);
        panel  = GameObject.GetGameObjectByName("PuzzleButton2").transform.GetChild(0).gameObject;
        panel2 = GetScript <BoobyTrapDeactivator>(panel);
        panel  = GameObject.GetGameObjectByName("PuzzleButton3").transform.GetChild(0).gameObject;
        panel3 = GetScript <BoobyTrapDeactivator>(panel);
        panel  = GameObject.GetGameObjectByName("PuzzleButton4").transform.GetChild(0).gameObject;
        panel4 = GetScript <BoobyTrapDeactivator>(panel);

        trapLightW        = GameObject.GetGameObjectByName("TrapLightW");
        trapLightR1       = GameObject.GetGameObjectByName("TrapLightR1");
        trapLightR1script = GetScript <PulsingLightScript>(trapLightR1);
        trapLightR2       = GameObject.GetGameObjectByName("TrapLightR2");
        trapLightR2script = GetScript <PulsingLightScript>(trapLightR2);
        trapLightR3       = GameObject.GetGameObjectByName("TrapLightR3");
        trapLightR3script = GetScript <PulsingLightScript>(trapLightR3);
        trapLightR4       = GameObject.GetGameObjectByName("TrapLightR4");
        trapLightR4script = GetScript <PulsingLightScript>(trapLightR4);

        poisonGas = GameObject.GetGameObjectByName("TSR_PoisonGas");
        gas       = poisonGas.GetComponent <CParticleEmitter>();
        gasScript = GetScript <TransformRiserScript>(poisonGas);

        GameObject boobyControllerObj = GameObject.GetGameObjectByName("TSR_TrapController");//trapControllerName);

        controllerScript = GetScript <BoobyTrapDeactivatorController>(boobyControllerObj);

        gasTimerShutdown = gas.mEmitterProperty.mMaxLifetime;

        mSound = gameObject.RequireComponent <CSound>();
    }
    public void OnStart()
    {
        GameObject panel = GameObject.GetGameObjectByName("PuzzleButton1").transform.GetChild(0).gameObject;
        panel1 = GetScript<BoobyTrapDeactivator>(panel);
        panel = GameObject.GetGameObjectByName("PuzzleButton2").transform.GetChild(0).gameObject;
        panel2 = GetScript<BoobyTrapDeactivator>(panel);
        panel = GameObject.GetGameObjectByName("PuzzleButton3").transform.GetChild(0).gameObject;
        panel3 = GetScript<BoobyTrapDeactivator>(panel);
        panel = GameObject.GetGameObjectByName("PuzzleButton4").transform.GetChild(0).gameObject;
        panel4 = GetScript<BoobyTrapDeactivator>(panel);

        trapLightW = GameObject.GetGameObjectByName("TrapLightW");
        trapLightR1 = GameObject.GetGameObjectByName("TrapLightR1");
        trapLightR1script = GetScript<PulsingLightScript>(trapLightR1);
        trapLightR2 = GameObject.GetGameObjectByName("TrapLightR2");
        trapLightR2script = GetScript<PulsingLightScript>(trapLightR2);
        trapLightR3 = GameObject.GetGameObjectByName("TrapLightR3");
        trapLightR3script = GetScript<PulsingLightScript>(trapLightR3);
        trapLightR4 = GameObject.GetGameObjectByName("TrapLightR4");
        trapLightR4script = GetScript<PulsingLightScript>(trapLightR4);

        poisonGas = GameObject.GetGameObjectByName("TSR_PoisonGas");
        gas = poisonGas.GetComponent<CParticleEmitter>();
        gasScript = GetScript<TransformRiserScript>(poisonGas);

        GameObject boobyControllerObj = GameObject.GetGameObjectByName("TSR_TrapController");//trapControllerName);
        controllerScript = GetScript<BoobyTrapDeactivatorController>(boobyControllerObj);

        gasTimerShutdown = gas.mEmitterProperty.mMaxLifetime;

        mSound = gameObject.RequireComponent<CSound>();
    }