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); }