public void OnStart() { myZone = gameObject.RequireComponent<CZone>(); //mySound.AddSound("RadioStatic.vente"); //mySound.AddSound("BeginOutro.vente"); //mySound.AddSound("Heartbeat.vente"); //mySound.Loop(true, "static.vente"); mySound = gameObject.RequireComponent<CSound>(); //mySound.PlayIndependentEvent("static.vente"); smc = new StateMachineController(); unactive = new State(smc, null, State_unactive_Update, null); lightson = new State(smc, State_lightson_Start, State_lightson_Update, null, _lightson[0]); lightsoff = new State(smc, State_lightsoff_Start, null, null, 1.0f, lightson); finished = new State(smc); finale = new State(smc, State_finale_Start, null, State_finale_End, 5.0f, finished); lightsonwait = new State(smc, null, null, null, 1.0f, lightsoff); lightson.NextState = lightson; smc.SetState(unactive); foreach (GameObject g in GameObject.GetGameObjectsWithTag("TLight")) { lights.Add(g.RequireComponent<CLight>()); g.RequireComponent<CSound>(); //.AddSound("LightTurnOn.vente"); } foreach (CLight l in lights) l.setEnabled(false); }
public void OnStart() { rand = new Random(); myZone = gameObject.RequireComponent<CZone>(); //mySound.AddSound("RadioStatic.vente"); //mySound.AddSound("BeginOutro.vente"); //mySound.AddSound("Heartbeat.vente"); //mySound.Loop(true, "static.vente"); mySound = gameObject.RequireComponent<CSound>(); //mySound.PlayIndependentEvent("static.vente"); smc = new StateMachineController(); unactive = new State(smc, null, State_unactive_Update, null); lightson = new State(smc, State_lightson_Start, State_lightson_Update, null, 1.0f); lightsoff = new State(smc, State_lightsoff_Start, null, null, 1.0f, lightson); lightsonwait = new State(smc, null, null, null, 1.0f, lightsoff); lightson.NextState = lightson; smc.SetState(unactive); foreach (GameObject g in GameObject.GetGameObjectsWithTag("TLight")) { lights.Add(g.RequireComponent<CLight>()); g.RequireComponent<CSound>(); //.AddSound("LightTurnOn.vente"); } foreach (GameObject g in GameObject.GetGameObjectsWithTag("FlickerLight")) { GetScriptClass<LightFlicker>(g).activated = true; } MonsterEncounter1 me = GetScript<MonsterEncounter1>(GameObject.GetGameObjectByName("Monster1")); me.gameObject.RequireComponent<CMeshRenderer>().setEnabled(false); }
public void OnStart() { zone = GameObject.GetGameObjectByName("scp_zone").RequireComponent<CZone>(); rand = new Random(); target = null; speed = new Vector3(.3f,.8f,-.5f); sound = gameObject.RequireComponent<CSound>(); fx = GameObject.GetGameObjectByName("Camera").RequireComponent<CArtifactFX>(); sound.PlayIndependentEvent("CREATURE_CLOSE.vente", true, 1); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CZone 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(CZone obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
/* * ELEVATOR ROOT (THIS OBJ) MUST BE ON THE FLOOR OF THE ELEVATOR FOR THIS TO WORK */ public void OnStart() { //dependencies doors = GetScriptsInChildren<DoorMain>(gameObject); idle = new State(smc); idle.OnEnter = State_Idle_Enter; idle.OnUpdate = State_Idle_Update; idle.OnExit = State_Idle_Exit; done = new State(smc); done.OnUpdate = State_done_Update; moving = new State(smc); moving.OnEnter = State_Moving_Enter; moving.OnUpdate = State_Moving_Update; moving.OnExit = State_Moving_Exit; moving.MaxTimeInState = moveTime; moving.NextState = done; returning = new State(smc); returning.OnEnter = State_returning_Enter; returning.OnUpdate = State_returning_Update; returning.OnExit = State_returning_Exit; returning.MaxTimeInState = moveTime; returning.NextState = idle; beginMoving = new State(smc, null, State_beginMoving_Update, null); player = Common.GetStealthPlayer(); playerScript = Common.GetStealthPlayerScript(); elevatorZone = gameObject.RequireComponent<CZone>(); sound_ = gameObject.RequireComponent<CSound>(); //sound_.AddSound("Elevator Start.vente"); //sound_.AddSound("Elevator Stop.vente"); smc.SetState(idle); timer = 0; startY = gameObject.transform.position.y; endY = startY + endY; }