public void OnStart() { ocuMouse = GetScript <OcuMouse>(Common.GetSurveillancePlayerMouse()); player = Common.GetStealthPlayer(); playerScript = GetScript <FirstPersonPlayer>(player); camera = Common.GetStealthPlayerCamera(); cameraCam = Common.GetSurveillancePlayerStaticCameraCam(); camScript = GetScript <CameraCam>(cameraCam); camRotLimitScript = GetScript <CameraRotationLimit>(gameObject); heldObjectPosition = GameObject.GetGameObjectByName("HeldObjectPosition"); sound = gameObject.RequireComponent <CSound>(); flyingSoundID = sound.GetUniqueEvent("CAM_FLIGHT.vente", 2); camPhysics = gameObject.RequireComponent <CPhysics>(); camPhysics.mColliderType = 1; camMesh = gameObject.RequireComponent <CMeshRenderer>(); mInitialScale = (Vector3)gameObject.transform.GetScale(); nonActive = new State(smc, State_NonActive_Enter, State_NonActive_Update, State_NonActive_Exit); flyingTowardsWall = new State(smc, State_FlyTowardsWall_Enter, State_FlyTowardsWall_Update, State_FlyTowardsWall_Exit); activeOnWall = new State(smc, State_ActiveOnWall_Enter, State_ActiveOnWall_Update, State_ActiveOnWall_Exit); flyingBackToPlayer = new State(smc, State_FlyingBackToPlayer_Enter, State_FlyingBackToPlayer_Update, State_FlyingBackToPlayer_Exit); smc.SetState(nonActive); // Initial state }
public override void OnStart() { base.OnStart(); mSound = gameObject.RequireComponent<CSound>(); mMazeAmbientID = mSound.GetUniqueEvent("AMB_MAZE.vente", 0); }
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() { offPointLightColor = new Color(0.8f, 0.0f, 0.0f, 1.0f); onPointLightColor = new Color(0.0f, 0.8f, 0.0f, 1.0f); // Initialize into the common list GameObject camInMap; Common.AddCameraObjectToList(gameObject, out camInMap, out camInMapArea); CameraInMap inMapScript = GetScript <CameraInMap>(camInMapArea); inMapScript.SetTwin(gameObject); // Set in map to be able to direct to me (camInWorld) if (gameObject == Common.GetRCCarCam()) { inMapScript.isActive = true; // always default RCCar to active } prevXCurrRot = xCurrRot = 0.0f; prevYCurrRot = yCurrRot = 0.0f; UpdateVectors(); if (xRotationLimit == 0.0f && yRotationLimit == 0.0f) { shouldPhysicalCameraRotate = false; } for (uint i = 0; i < gameObject.transform.GetNumberOfChildren(); ++i) { GameObject childObj = gameObject.transform.GetChild(i).gameObject; if (childObj.GetName() == Common.nameForCamLight) { spotlight = childObj.RequireComponent <CLight>(); spotlight.SetDiffuse(new Color(0.706f, 0.96f, 0.714f, 1.0f)); // FFB4FCB6 // spotlight.SetRange(10.0f); // spotlight.SetSpot(10.0f); // spotlight.SetAtt(1.0f); // spotlight.SetLightType(CLight.LIGHTTYPE.SPOTLIGHT); spotlight.setEnabled(false); } else if (childObj.GetName() == Common.nameForCamPointLight) { pointlight = childObj.RequireComponent <CLight>(); SetPointLight(false); pointlight.setEnabled(true); } } mSound = gameObject.RequireComponent <CSound>(); mCamRotateID = mSound.GetUniqueEvent("CAM_ROTATE.vente", 1); }
public override void OnStart() { base.OnStart(); mSound = gameObject.RequireComponent <CSound>(); mEscapeEventID = mSound.GetUniqueEvent("MUSIC_ESCAPE.vente", 0); mDirectionToRun = gameObject.transform.GetForwardVector(); tutorialIconObj = GameObject.GetGameObjectByName(mTutorialIconName); playerScript = GetScript <FirstPersonPlayer>(Common.GetStealthPlayer()); isactive = false; Common.SetOpacityToAllUI(0.0f, tutorialIconObj); // Init all to 0 opacity }