Exemple #1
0
        public SpaceCamera(Objective objective, AbilitySelector selector, ObjectiveArrow objectiveArrow, Image objectiveCircle,
                           Camera camera, CameraFlash cameraFlash, SceneChanger sceneChanger, Text level)
        {
            this.objective       = objective;
            this.selector        = selector;
            this.objectiveArrow  = objectiveArrow;
            this.objectiveCircle = objectiveCircle;
            this.camera          = camera;
            this.cameraFlash     = cameraFlash;
            this.sceneChanger    = sceneChanger;
            this.level           = level;

            // By default, off
            this.objectiveCircle.gameObject.SetActive(false);
            this.objectiveArrow.gameObject.SetActive(false);
        }
 void Start()
 {
     staffBuilder     = GetComponent <StaffBuilder>();
     barBuilder       = GetComponent <BarBuilder>();
     colourController = GetComponent <ColourController>();
     foreach (Material mat in itemMaterials)
     {
         mat.color = colourController.getItem();
     }
     globalData = GetComponent <GlobalData>();
     colourController.SortColours();
     UICamera.backgroundColor = mainCamera.backgroundColor;
     staffBuilder.GenerateStaff();
     cameraFlash     = flashCamera.GetComponent <CameraFlash>();
     flashController = GetComponent <FlashController>();
 }
        private static UIImagePickerControllerCameraFlashMode GetUICameraFlashMode(CameraFlash device)
        {
            switch (device)
            {
            case CameraFlash.Default:
                return(UIImagePickerControllerCameraFlashMode.Auto);

            case CameraFlash.On:
                return(UIImagePickerControllerCameraFlashMode.On);

            case CameraFlash.Off:
                return(UIImagePickerControllerCameraFlashMode.Off);

            default:
                throw new NotSupportedException();
            }
        }
Exemple #4
0
 // Start is called before the first frame update
 void Start()
 {
     intialPosition = transform.position;
     flash          = GameObject.FindGameObjectWithTag("CameraFlash").GetComponent <CameraFlash>();
     currentState   = AnimationStates.down;
 }