Esempio n. 1
0
    public void GenerateSecurityCameraAtTile(Tile tile)
    {
        SecurityCamera securityCamera = obstaclesContainer.AddChild <SecurityCamera>(securityCameraPrefab);

        securityCamera.name     = "Security Camera";
        securityCamera.Position = tile.Position;
    }
        private static void SecurityVoid()
        {
            Background.DisableBackground(Background.Type.Computer);
            GameFiber.StartNew(delegate
            {
                if (CData == null)
                {
                    return;
                }

                Background.DisableBackground(Background.Type.Computer);
                SecurityCamera.SecurityCameraStart(CData);

                while (SecurityCamera.IsRunning)
                {
                    GameFiber.Yield();
                }

                Background.EnableBackground("form_background.jpg");
                if (!string.IsNullOrWhiteSpace(PlateNumber))
                {
                    var susData =
                        LtFlash.Common.Serialization.Serializer.GetSelectedListElementFromXml <PedData>(Main.SDataPath,
                                                                                                        c => c.FirstOrDefault(s => s.IsPerp));
                    MessageBoxCode.Message =
                        $"License Plate Detected: {PlateNumber}\nRegisterd to: {susData.Name}  Gender: {susData.Gender}";
                    Computer.Controller.SwitchFibers(Computer.Controller.SecurityCamFiber, Fibers.MessageBoxFiber);
                }
                else
                {
                    Computer.Controller.SwitchFibers(Computer.Controller.SecurityCamFiber, Fibers.MainFiber);
                }
            });
        }
Esempio n. 3
0
 public override void SetCorrectSubLineValue()
 {
     foreach (GameObject subLine in lines)
     {
         Line lCode = subLine.GetComponent <Line>();
         if (lCode.tag == "disableEleavtor")
         {
             lCode.SetSubButtonText("true");
         }
         if (lCode.tag == "elevatorHeight")
         {
             Elevator controller = controllingObject.GetComponent <Elevator>();
             lCode.SetSubButtonText(controller.openHeight.ToString());
         }
         if (lCode.tag == "deactivateIntensity1")
         {
             SecurityCamera controller2 = controllingObject2.GetComponent <SecurityCamera>();
             lCode.SetSubButtonText(controller2.deactivateIntensity.ToString());
         }
         if (lCode.tag == "deactivateIntensity2")
         {
             SecurityCamera controller3 = controllingObject3.GetComponent <SecurityCamera>();
             lCode.SetSubButtonText(controller3.deactivateIntensity.ToString());
         }
     }
 }
Esempio n. 4
0
 int findCurrCamera(SecurityCamera c)
 {
     for (int i =0 ; i < currentCameras.Length ; i++){
         if (currentCameras[i] == c) return i;
     }
     return -1;
 }
 void OnEnable()
 {
     if(_target == null && !Application.isPlaying){
         _target = (SecurityCamera)target;
         _target.camera.depth = 999999;
     }
 }
Esempio n. 6
0
 // Use this for initialization
 void Start()
 {
     clickMask      = ~LayerMask.GetMask("Camera Trigger");
     navMeshAgent   = GetComponent <NavMeshAgent>();
     inventory      = GetComponent <InventorySystem>();
     securityCam    = GameObject.FindGameObjectWithTag("SecurityCamera").GetComponent <SecurityCamera>();
     moveToInteract = false;
 }
Esempio n. 7
0
 void setCamera(int camLocation, SecurityCamera c)
 {
     foreach (SecurityCamera sc in cameras) {
         sc.controlable = false;
     }
     if (currentCameras[camLocation]) currentCameras[camLocation].camera.enabled = false;
     currentCameras[camLocation] = c;
     transitionTimestamp[camLocation] = Time.fixedTime + switchTimeout;
     transitionTo[camLocation] = c;
     noiseCameras[camLocation].camera.enabled = true;
 }
Esempio n. 8
0
    /// <summary>
    /// Set which camera this slider controls.
    /// </summary>
    /// <param name="cam">Cam to control</param>
    public void SetCamera(SecurityCamera cam)
    {
        if (cam == null)
        {
            return;
        }

        cameraToControl = cam;
        slider.maxValue = cameraToControl.maxPositiveHorizontal; slider.minValue = cameraToControl.maxNegativeHorizontal;
        slider.value    = cameraToControl.transform.rotation.y;
    }
Esempio n. 9
0
        void onCameraTriggered(CameraTriggered cameraTriggered)
        {
            SecurityCamera securityCamera = cameraTriggered.SecurityCamera;

            for (int index = 0; index < abstractAlarms.Length; index++)
            {
                if (securityCamera.GetAlarmID() == abstractAlarms[index].GetAlarmID())
                {
                    AbstractAlarmActivated(abstractAlarms[index]);
                }
            }
        }
    static void Main(string[] agrs)
    {
        GoogleNest gn = new GoogleNest();

        SecurityCamera sc1 = new SecurityCamera(gn);

        sc1.GetConnected();

        AmazonAlexa    aa  = new AmazonAlexa();
        SecurityCamera sc2 = new SecurityCamera(aa);

        sc2.GetConnected();
    }
 public override void SetCorrectSubLineValue()
 {
     foreach (GameObject subLine in lines)
     {
         Line lCode = subLine.GetComponent <Line>();
         if (lCode.tag == "inactive")
         {
             lCode.SetSubButtonText("false");
         }
         if (lCode.tag == "deactivateIntensity")
         {
             SecurityCamera controller = controllingObject.GetComponent <SecurityCamera>();
             lCode.SetSubButtonText(controller.deactivateIntensity.ToString());
         }
     }
 }
Esempio n. 12
0
    public override void UpdateRealVariables()
    {
        foreach (GameObject subLine in lines)
        {
            Line lCode = subLine.GetComponent <Line>();
            if (lCode.tag == "disableEleavtor")
            {
                disableElevator = bool.Parse(lCode.GetSubText());
                if (!disableElevator)
                {
                    Elevator controller = controllingObject.GetComponent <Elevator>();
                    controller.open = true;
                }
            }

            if (lCode.tag == "elevatorHeight")
            {
                Elevator controller = controllingObject.GetComponent <Elevator>();
                float    newVal     = float.Parse(lCode.GetSubText());
                controller.openHeight = newVal;
            }
            if (lCode.tag == "deactivateIntensity1")
            {
                SecurityCamera controller = controllingObject2.GetComponent <SecurityCamera>();
                float          newVal     = float.Parse(lCode.GetSubText());
                controller.deactivateIntensity = newVal;
                if (newVal >= 20)
                {
                    controller.permaSpotted = false;
                    controller.playerSeen   = false;
                }
            }
            if (lCode.tag == "deactivateIntensity2")
            {
                SecurityCamera controller = controllingObject3.GetComponent <SecurityCamera>();
                float          newVal     = float.Parse(lCode.GetSubText());
                controller.deactivateIntensity = newVal;
                if (newVal >= 20)
                {
                    controller.permaSpotted = false;
                    controller.playerSeen   = false;
                }
            }
        }
    }
    public override void UpdateRealVariables()
    {
        foreach (GameObject subLine in lines)
        {
            Line lCode = subLine.GetComponent <Line>();
            if (lCode.tag == "inactive")
            {
                inactive = bool.Parse(lCode.GetSubText());
            }

            if (lCode.tag == "deactivateIntensity")
            {
                SecurityCamera controller = controllingObject.GetComponent <SecurityCamera>();
                float          newVal     = float.Parse(lCode.GetSubText());
                controller.deactivateIntensity = newVal;
                if (newVal >= 10 && inactive)
                {
                    controller.permaSpotted = false;
                    controller.playerSeen   = false;
                }
            }
        }
    }
 void Awake()
 {
     _audioController = GetComponent <AudioController>();
     _cctvCamera      = GetComponentInChildren <Camera>();
     _securityCamera  = GetComponent <SecurityCamera>();
 }
Esempio n. 15
0
 private void OnEnable()
 {
     targetObject = target as SecurityCamera;
 }
Esempio n. 16
0
 void switchCamera(int camLocation, SecurityCamera c)
 {
     foreach (SecurityCamera sc in cameras) {
         sc.controlable = false;
     }
     noiseCameras[camLocation].camera.enabled = false;
     c.camera.pixelRect = rectPositions [camLocation];
     c.camera.enabled = true;
     c.controlable = true;
     currentCameras [camLocation] = c;
 }
Esempio n. 17
0
 // Start is called before the first frame update
 void Start()
 {
     sccopy = GetComponentInParent <SecurityCamera>();
 }
Esempio n. 18
0
 public void SelectCamera(SecurityCamera camera)
 {
     selectedCamera = camera;
 }
 public CameraTriggered(SecurityCamera triggeredCamera)
 {
     SecurityCamera = triggeredCamera;
 }
Esempio n. 20
0
 public void DeselectCamera(SecurityCamera camera)
 {
     selectedCamera = null;
 }