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 override void OnStart() { base.OnStart(); player = Common.GetStealthPlayer(); girl = GameObject.GetGameObjectByName("MonsterGirl_Hall").GetComponent<CSkinMeshRenderer>(); girl.setEnabled(false); sound = gameObject.RequireComponent<CSound>(); }
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 void OnUpdate() { if (spin >= 0) { spin -= FrameController.DT()*2; gameObject.transform.RotateAround(Vector3.Up, spin); light.mIntensity = spin / 30.0f; light.mRange = light.mIntensity; } if (spookEnabled) { Vector3 forw = (Vector3)Common.GetSurveillancePlayerCam().transform.GetForwardVector(); if (Vector3.Dot(forw,(Vector3)spookg.transform.GetForwardVector()) < -0.88f) { Logger.Log("boo"); spookEnabled = false; spook = null; spookg.transform.SetPositionY(-1000); gameObject.RequireComponent<CSound>().PlayIndependentEvent("C1_ANGRY.vente", false, 0); } } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CSkinMeshRenderer obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CSkinMeshRenderer obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }