public void OnStart() { // Camcphy = gameObject.RequireComponent<CPhysics>(); // bcc = gameObject.RequireComponent<CBoxColliderComponent>(); sound = gameObject.RequireComponent<CSound>(); testIndex = 0; }
public void OnStart() { sound_ = gameObject.RequireComponent<CSound>(); // sound_.AddSound("Combat1.vente"); // sound_.Play("Combat1.vente"); // sound_.Stop("Combat1.vente"); }
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(); sound = gameObject.RequireComponent<CSound>(); doorButtonMesh = gameObject.RequireComponent<CMeshRenderer>(); if (doorName != null && doorName.Length > 0) { door = GameObject.GetGameObjectByName(doorName); if (requiresSurveillancePlayer) doorButtonMesh.GetMaterial().SetColor(SharpMocha.YELLOW); else doorButtonMesh.GetMaterial().SetColor(SharpMocha.CORNFLOWER_BLUE); } else { isButtonRed = true; // it is a default locked button } doorButtonColor = doorButtonMesh.GetMaterial().GetColor(); playerMouse = GetScript<Mouse>(Common.GetStealthPlayerMouse() ); player = Common.GetStealthPlayer(); playerScript = Common.GetStealthPlayerScript(); ocuConsole = GetScript<OcuConsoleScreen>(Common.GetSurveillancePlayerConsoleScreen()); }
public void OnStart() { player = GameObject.GetGameObjectByName("Camera"); sound_ = gameObject.RequireComponent<CSound>(); // sound_.AddSound("TURRET_LASER_TEMP.wav"); // sound_.Stop(); }
public override void OnStart() { base.OnStart(); mSound = gameObject.RequireComponent<CSound>(); flickeringLights = new List<CLight>(); GameObject lightObj = GameObject.GetGameObjectByName("LightFlicker"); CLight flickeringLight = lightObj.RequireComponent<CLight>(); originalIntensity = flickeringLight.GetAtt(); flickeringLights.Add(flickeringLight); for (int index = 2; index <= 6; ++index) { string lightName = "LightFlicker " + index.ToString(); lightObj = GameObject.GetGameObjectByName(lightName); flickeringLight = lightObj.RequireComponent<CLight>(); flickeringLights.Add(flickeringLight); } foreach (CLight light in flickeringLights) { light.setEnabled(false); // Turn off all lights at start } glass = GameObject.GetGameObjectByName("GlassMonster"); glassScript = GetScript<TutorialGlassSound>(glass); monster = GameObject.GetGameObjectByName("Monster"); monsterInitPos = monster.transform.position; GameObject doorObj = GameObject.GetGameObjectByName("door6"); door = GetScript<DoorMain>(doorObj); mDirectionToRun = gameObject.transform.GetForwardVector(); mDirectionTowardGlass = gameObject.transform.GetRightVector(); }
// Use this for initialization public void OnStart() { mSound = gameObject.RequireComponent<CSound>(); ocuConsole = GetScript<OcuConsoleScreen>(Common.GetSurveillancePlayerConsoleScreen()); RandomCenter(); }
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() { trans_ = gameObject.RequireComponent<CTransform>(); upperTrans_ = GameObject.GetGameObjectByName("spinner_upper").RequireComponent<CTransform>(); lowerTrans_ = GameObject.GetGameObjectByName("spinner_lower").RequireComponent<CTransform>(); trans_.SetPositionY(lowerTrans_.position.y); leftSound_ = GameObject.GetGameObjectByName("spinner_left").RequireComponent<CSound>(); rightSound_ = GameObject.GetGameObjectByName("spinner_right").RequireComponent<CSound>(); smc = new StateMachineController(); startup = new State(smc, null, State_startup_Update, null); riseup = new State(smc, State_riseup_OnStart, State_riseup_Update, null); lowerdown = new State(smc, State_lowerdown_OnStart, State_lowerdown_Update, null); end = new State(smc, null, State_end_Update, null); smc.SetState(startup); transitionTime_ = 3; startupTimer_ = 0; startupTime_ = 5; shutdownTime_ = 7; riseupTimer_ = 0; riseupTime_ = 5; revInitTime_ = 20.0f; revFinalTime_ = 1.0f; }
public override void OnStart() { base.OnStart(); mSound = gameObject.RequireComponent<CSound>(); mMazeAmbientID = mSound.GetUniqueEvent("AMB_MAZE.vente", 0); }
// public List<float> angles {get { return _angles;} set { _angles = value; }} public void OnStart() { player = Common.GetStealthPlayer(); playerCamScript = GetScript<FirstPersonCamera>(Common.GetStealthPlayerCamera()); mSound = gameObject.RequireComponent<CSound>(); //mSound.Stop("Turret_Rotate.vente"); //mSound.Stop("Turret_Targetting.vente"); // mSound.Volume(0.3f); //mSound.AddSound("Turret_LaserShot.vente"); angleList = new List<float>(); angleList.Add(Angle1); angleList.Add(Angle2); // Start with the turret at the first angle currAngleIndex = 0; gameObject.transform.rotation.Angles.y = angleList[currAngleIndex]; currentState = 1; startAngle = gameObject.transform.rotation.Angles.y; angleArcOfFire = MathHelper.ToRadians(35.0f); // half angle cosAngleArcOfFire = (float)Math.Cos((double)angleArcOfFire); timerToStayOnGuard = TIME_TO_ON_GUARD; timerToRotate = TIME_TO_ROTATE; }
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() { mSound = gameObject.RequireComponent<CSound>(); // scale should be 0.221f, 0124f menuPointer = GameObject.GetGameObjectByName(Common.prefix + menuPointerName); menuPointer.transform.SetParent(null); Common.SetOpacityToGameObject(0.0f, menuPointer); menuPointerInitPos = new Vector3(-2.75f, 1.23f, -0.05f); menuPointer.transform.SetPosition(menuPointerInitPos); screenImageMesh = gameObject.RequireComponent<CDiffuseRenderer>(); screenImageMesh.GetMaterial().SetColor(new Color(1.0f, 1.0f, 1.0f, 0.0f)); optionsPos = new Vector3(0.0f, -90.0f, 0.0f); // Position to look at options menu pauseOptions = Common.GetPauseOptionsScreen().RequireComponent<CDiffuseRenderer>(); Common.GetPauseOptionsScreen().transform.SetPosition(optionsPos); pauseOptions.setEnabled(false); GameObject pausePointerObj = Common.GetChildByName(pauseOptions.gameObject, "menuPointer"); pauseMenuPointer = pausePointerObj.RequireComponent<CDiffuseRenderer>(); pauseMenuPointer.setEnabled(false); Common.GetMenuFullscreenX().setEnabled(false); // Init all options stuff to invisible Common.GetMenuMuteX().setEnabled(false); Common.GetMenuVolumeFont().setEnabled(false); fadeScreen = GameObject.GetGameObjectByName(Common.prefix + fadeScreenName); Common.SetOpacityToGameObject(fadeOpacity, fadeScreen); // Start with full black optionsFadeScreen = GameObject.GetGameObjectByName(Common.prefix + optionsFadeScreenName); Common.SetOpacityToGameObject(fadeOpacity, optionsFadeScreen); mLoadingFirstTime = true; mPrevMainMenuState = -1; mMainMenuState = -1; mPointerPosition = new List<Vector2>(); // 0.227, 0.115 mPointerPosition.Add(new Vector2(-0.0753f, 0.028f)); mPointerPosition.Add(new Vector2(-0.0753f, 0.0233f)); mPointerPosition.Add(new Vector2(-0.0753f, 0.0186f)); mPointerPosition.Add(new Vector2(-0.0753f, 0.0139f)); mPointerPosition.Add(new Vector2(-0.0753f, -0.0051f)); // wrong mPointerPosForMainMenuConfirmation = new List<Vector2>(); mPointerPosForMainMenuConfirmation.Add(new Vector2(-0.0693f, 0.0043f)); mPointerPosForMainMenuConfirmation.Add(new Vector2(-0.0693f, -0.0004f)); mPointerPosForQuitConfirmation = new List<Vector2>(); mPointerPosForQuitConfirmation.Add(new Vector2(-0.0693f, -0.0145f)); mPointerPosForQuitConfirmation.Add(new Vector2(-0.0693f, -0.0193f)); mCurrPointerPos = mPointerPosition[0]; // When going to How To Play / Options, change camera to Ortho, at (0,0,0), with 0 rotation // Bring up the ortho image }
public void OnStart() { sound = gameObject.RequireComponent<CSound>(); fx = Common.GetStealthPlayerCamera().RequireComponent<CArtifactFX>(); //sound.PlayIndependentEvent("CREATURE_CLOSE.vente", true, 1); Activated = false; currTime = MaxTime; fx.mBlockThreshold = 0.0f; fx.mLineThreshold = 0.0f; }
public override void OnStart() { base.OnStart(); mSound = gameObject.RequireComponent<CSound>(); glassCrackID = mSound.GetUniqueEvent("GLASS_CRACK.vente", 1); mDirectionToRun = gameObject.transform.GetForwardVector(); isactive = 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); }
public override void OnStart() { base.OnStart(); player = Common.GetStealthPlayer(); girl = GameObject.GetGameObjectByName("MonsterGirl_Hall").GetComponent<CSkinMeshRenderer>(); girl.setEnabled(false); sound = gameObject.RequireComponent<CSound>(); }
public override void OnStart() { base.OnStart(); buttonMesh = gameObject.RequireComponent<CMeshRenderer>(); boobyTrapControllerObj = GameObject.GetGameObjectByName("TSR_SeqScrambler"); boobyTrapScript = GetScript<BoobyTrapControllerScript>(boobyTrapControllerObj); //buttonMesh.GetMaterial().SetColor(SharpMocha.CORNFLOWER_BLUE); sound = gameObject.RequireComponent<CSound>(); }
public override void OnStart() { base.OnStart(); mInitZ = gameObject.transform.GetPosition(CTransform.TransformSpace.LOCAL).z; Reset(); boobyControllerObj = GameObject.GetGameObjectByName("TSR_TrapController");//trapControllerName); controllerScript = GetScript<BoobyTrapDeactivatorController>(boobyControllerObj); controllerScript.allPanels.Add(gameObject); // Add myself to the controller list of buttons sound = gameObject.RequireComponent<CSound>(); }
// Use this for initialization public override void OnStart() { base.OnStart(); mSound = gameObject.RequireComponent<CSound>(); controllerScript = GetScript<MiniGameFourPlayersButtonController>( GameObject.GetGameObjectByName(Common.prefix + "TSR2_DoorUnlockPanelStealthA")); mMyIndex = controllerScript.GetButtonIndex(gameObject); panelParent = gameObject.transform.GetParent().GetParent().gameObject; RandomCenter(); // Initialize the column puzzle }
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>(); }
// Use this for initialization public override void OnStart() { base.OnStart(); mSound = gameObject.RequireComponent<CSound>(); DoorUnlock = GameObject.GetGameObjectByName("DoorUnlockSequence"); doorUnlockSeq = GetScript<DoorUnlockSequence>(DoorUnlock); panelParent = gameObject.transform.GetParent().GetParent().gameObject; playerMouse = GetScript<Mouse>(Common.GetStealthPlayerMouse() ); player = Common.GetStealthPlayer(); playerScript = GetScript<FirstPersonPlayer>(player); }
public override void OnStart() { base.OnStart(); if (String.IsNullOrEmpty(tagName)) return; foreach (GameObject obj in GameObject.GetGameObjectsWithTag(tagName)) { lights.Add(obj.RequireComponent<CLight>()); } lightOnName = "F_LIGHT_SWITCH_ON"; _sound = gameObject.RequireComponent<CSound>(); //isActive = false; }
public override void OnStart() { base.OnStart(); if (String.IsNullOrEmpty(tagName)) return; foreach (GameObject obj in GameObject.GetGameObjectsWithTag(tagName)) { debris.Add(obj.RequireComponent<CPhysics>()); } caution = gameObject.RequireComponent<CSound>(); //isActive = false; }
public override void OnStart() { light = gameObject.GetComponentInChildren<CLight>(); light.setEnabled(false); lightState = InitialLightState; gameObject.GetComponent<CForwardRenderer>().mEmissiveColor = new Color(0.1f,0.1f,0.1f,1.0f); sound = gameObject.RequireComponent<CSound>(); GameObject tr = GameObject.GetGameObjectByName("Monster4TriggerArea"); if (tr != null) { trigger = GetScript<Monster4TriggerArea>(tr); trigger.M4LightsToTurnOff++; Logger.Log("M4Light to turn on, found for M4: #" + trigger.M4LightsToTurnOff.ToString()); } base.OnStart(); }
public void OnStart() { idle = new State(smc); finished = new State(smc); moving = new State(smc); startY = gameObject.transform.position.y; endY = gameObject.transform.position.y + 5; sound = gameObject.RequireComponent<CSound>(); // sound.AddSound("Door Move.vente"); smc.SetState(idle); moving.OnEnter = State_Moving_Enter; moving.OnUpdate = State_Moving_Update; idle.OnUpdate = State_Idle_Update; //moving.MaxTimeInState = 1.1f; }
public override void OnStart() { base.OnStart(); buttonMesh = gameObject.RequireComponent<CMeshRenderer>(); buttonColor = buttonMesh.GetMaterial().GetColor(); sound = gameObject.RequireComponent<CSound>(); if (gameObject.GetName()[0] == 'r') keyCode = 1; else if (gameObject.GetName()[0] == 'g') keyCode = 2; else keyCode = 3; seqControllerObj = GameObject.GetGameObjectByName("SequenceScrambler"); seqController = GetScript<AccessSequenceControllerScript>(seqControllerObj); //buttonMesh.GetMaterial().SetColor(SharpMocha.CORNFLOWER_BLUE); }
public void OnStart() { sound = gameObject.RequireComponent<CSound>(); pinPadDisplay = gameObject.RequireComponent<CFontRenderer>(); pinPadDisplay.mText = "---"; pinPadDisplayBg = gameObject.transform.GetParent().gameObject.RequireComponent<CMeshRenderer>(); baseDisplayColor = pinPadDisplayBg.GetMaterial().GetColor(); GameObject door = GameObject.GetGameObjectByName(doorName); if (door != null) doorScript = GetScript<DoorMain>(door); // doorTop = GameObject.GetGameObjectByName(doorBtmName); // doorBtm = GameObject.GetGameObjectByName(doorTopName); playerMouse = GetScript<Mouse>(Common.GetStealthPlayerMouse() ); player = Common.GetStealthPlayer(); playerScript = GetScript<FirstPersonPlayer>(player); }
public void OnStart() { smc = new StateMachineController(); lightsmc = new StateMachineController(); player = Common.GetStealthPlayer(); binds = GameObject.GetGameObjectByName("Monster4Binds"); attackParticle = GameObject.GetGameObjectByName("Monster4AttackParts").GetComponent<CParticleEmitter>(); attackParticle.setEnabled(false); poofParticle = GameObject.GetGameObjectByName("Monster4Poof").GetComponent<CParticleEmitter>(); mlight = gameObject.GetComponentInChildren<CLight>(); sound = gameObject.RequireComponent<CSound>(); screen = Common.GetConsoleScreenScript(); mesh = GameObject.GetGameObjectByName("M4Mesh").RequireComponent<CMeshRenderer>(); hunting = new State(smc, S_hunting_Start, S_hunting_Update, null); respawning = new State(smc, S_respawning_Start, null, S_respawning_End, RESPAWNTIME, hunting); attacking = new State(smc, S_attacking_Start, S_attacking_Update, S_attacking_End); attacking_intro = new State(smc, S_attacking_intro_Start, S_attacking_intro_Update, null, 1.0f, attacking); incoming = new State(smc, S_incoming_Start, S_incoming_Update, null, 3.0f, respawning); hurting = new State(smc, S_hurting_Start, S_hurting_Update, null, 1.0f, respawning); idle = new State(smc); dying = new State(smc, S_dying_Start, null, S_dying_End, 2.0f, idle); //light smc hold = new State(lightsmc, null, null, null); turningoff = new State(lightsmc, null, S_turningoff_Update, null, 0.5f, hold); turningon = new State(lightsmc, null, S_turningon_Update, null, 0.5f, hold); //binds smc bindssmc = new StateMachineController(); bindhold = new State(bindssmc, null, null, null); bindsmoveup = new State(bindssmc, S_bindsmoveup_Start, S_bindsmoveup_Update, null, 0.5f, bindhold); bindsmovedown = new State(bindssmc, null, S_bindsmovedown_Update, S_bindsmovedown_End, 0.5f, bindhold); helper = new MonsterHelper(); smc.SetState(respawning); lightsmc.SetState(hold); DisplayCorruption(); }
public void OnStart() { STALK_RANGE = DEFAULT_STALK_RANGE; //dependencies //cmesh = gameObject.RequireComponent<CMeshRenderer>(); stealth_player = Common.GetStealthPlayer(); monster3Woman = GetScript<Monster3Woman>(GameObject.GetGameObjectByName("Monster3Woman")); sound = gameObject.RequireComponent<CSound>(); //states smc = new StateMachineController(); inactive = new State(smc, null, null, null); incoming = new State(smc, State_Incoming_Start, State_Incoming_Update, null); stalking = new State(smc, State_Stalking_Start, State_Stalking_Update, null, 5.0f, incoming); resetting = new State(smc, State_Reset_Start, State_Reset_Update, null, 18.0f, stalking); attacking = new State(smc, State_Attacking_Start, State_Attacking_Update, State_Attacking_End, 4.0f, inactive); panicking = new State(smc, State_Panicking_Start, State_Panicking_Update, State_Panicking_End, 1.5f, resetting); helper = new MonsterHelper(); smc.SetState(resetting); }