public void OnStart()
    {
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col0"))
        {
            _col0Lights.Add(obj.RequireComponent <CLight>());
            _allLights.Add(obj.RequireComponent <CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col1"))
        {
            _col1Lights.Add(obj.RequireComponent <CLight>());
            _allLights.Add(obj.RequireComponent <CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col2"))
        {
            _col2Lights.Add(obj.RequireComponent <CLight>());
            _allLights.Add(obj.RequireComponent <CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col3"))
        {
            _col3Lights.Add(obj.RequireComponent <CLight>());
            _allLights.Add(obj.RequireComponent <CLight>());
        }

        chilloutFace  = GameObject.GetGameObjectByName("lastchilloutface");
        faceRender    = chilloutFace.RequireComponent <CSkinMeshRenderer>();
        faceTransform = chilloutFace.RequireComponent <CTransform>();
        faceRender.setEnabled(false);

        distortScript = GetScript <DistortForTime>(gameObject);

        currAliveTimer = MMath.GetRandomLimitedFloat(_monsterMinActiveTime, _monsterMaxActiveTime);

        sound = gameObject.RequireComponent <CSound>();
    }
    public void OnStart()
    {
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col0"))
        {
            _col0Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col1"))
        {
            _col1Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col2"))
        {
            _col2Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col3"))
        {
            _col3Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }

        chilloutFace = GameObject.GetGameObjectByName("lastchilloutface");
        faceRender = chilloutFace.RequireComponent<CSkinMeshRenderer>();
        faceTransform  = chilloutFace.RequireComponent<CTransform>();
        faceRender.setEnabled(false);

        distortScript = GetScript<DistortForTime>(gameObject);

        currAliveTimer = MMath.GetRandomLimitedFloat(_monsterMinActiveTime, _monsterMaxActiveTime);

        sound = gameObject.RequireComponent<CSound>();
    }
Beispiel #3
0
    public void OnStart()
    {
        //base.OnStart();
        currAliveTimer = MMath.GetRandomLimitedFloat(_monsterMinActiveTime, _monsterMaxActiveTime);
        currDeadTimer  = MMath.GetRandomLimitedFloat(_monsterMinRestTime, _monsterMaxRestTime);

        chilloutFace  = GameObject.GetGameObjectByName("maxChill");
        faceRender    = chilloutFace.RequireComponent <CSkinMeshRenderer>();
        faceTransform = chilloutFace.RequireComponent <CTransform>();
        faceRender.setEnabled(false);

        distortScript = GetScript <DistortForTime>(gameObject);
    }
    public void OnStart()
    {
        //base.OnStart();
        currAliveTimer = MMath.GetRandomLimitedFloat(_monsterMinActiveTime, _monsterMaxActiveTime);
        currDeadTimer = MMath.GetRandomLimitedFloat(_monsterMinRestTime, _monsterMaxRestTime);

        chilloutFace = GameObject.GetGameObjectByName("maxChill");
        faceRender = chilloutFace.RequireComponent<CSkinMeshRenderer>();
        faceTransform  = chilloutFace.RequireComponent<CTransform>();
        faceRender.setEnabled(false);

        distortScript = GetScript<DistortForTime>(gameObject);
    }
    public override void OnStart()
    {
        base.OnStart();
        monsterCroak = "C1_PAIN.vente";
        GameObject face = GameObject.GetGameObjectByName(scaryObjName);
        GameObject lightObj = GameObject.GetGameObjectByName(scaryLightName);

        light = lightObj.RequireComponent<CLight>();
        lightScript = GetScript<LightFlicker>(lightObj);
        distortScript = GetScript<DistortForTime>(gameObject);
        scaryRender = face.RequireComponent<CSkinMeshRenderer>();
        scaryRender.setEnabled(false);
        _sound = gameObject.RequireComponent<CSound>();
    }
    public override void OnStart()
    {
        base.OnStart();
        monsterCroak = "C1_PAIN.vente";
        GameObject face     = GameObject.GetGameObjectByName(scaryObjName);
        GameObject lightObj = GameObject.GetGameObjectByName(scaryLightName);

        light         = lightObj.RequireComponent <CLight>();
        lightScript   = GetScript <LightFlicker>(lightObj);
        distortScript = GetScript <DistortForTime>(gameObject);
        scaryRender   = face.RequireComponent <CSkinMeshRenderer>();
        scaryRender.setEnabled(false);
        _sound = gameObject.RequireComponent <CSound>();
    }