Esempio n. 1
0
    public void Start()
    {
        Weather weather = FindObjectOfType <Weather>();

        if (weather != null)
        {
            //set fog gradient
            GlobalFog f = FindObjectOfType <GlobalFog>();
            f.fogGradient = weather.transform.FindChild("FogGradient").GetComponent <GradientToTexture>();
            f.applyGradient();
            //set skybox
            RenderSettings.skybox = weather.skybox;
        }
        storage         = FindObjectOfType <PhotoStorage>();
        fog             = FindObjectOfType <GlobalFog>();
        fogDefault      = fog.endDistance;
        fog.endDistance = 0;
    }
Esempio n. 2
0
    public void Start()
    {
        photos = GameObject.FindObjectOfType <PhotoStorage>();
        photos.transferTextures();

        int count = 0;
        int layer = 0;

        for (int i = 0; i < photos.photos.Count; i++)
        {
            GameObject p = GameObject.Instantiate(photoPrefab);
            p.GetComponent <MeshRenderer>().material.mainTexture = photos.photos[i];
            p.transform.position = transform.position + new Vector3(randomness * Random.Range(-1f, 1f), layer * STACKING, count * spacing);
            p.transform.Rotate(0, 0, Random.Range(0f, 360f));
            count++;
            if (count >= tableSize)
            {
                count = 0;
                layer++;
            }
            p.GetComponent <Photograph>().info = photos.infos[i];
        }
    }
Esempio n. 3
0
        public AppViewModel(IDialogService dialogService, ILocationWindowService locationWindow)
        {
            InitCommands();
            this.dialogService = dialogService;
            editLocationWindow = locationWindow;
            ImageDropHandler   = new ImageDropHandler(this);

            LocationChanged += OnLocationChanged;

            try
            {
                Locations = AppDataManager.LoadLocations(AppFiles.ImagesPath);
            }
            catch (Exception)
            {
                Locations = PhotoStorage.GetLocations();
            }

            if (Locations.Count > 0)
            {
                CurrentLocation = Locations[0];
            }
        }
Esempio n. 4
0
 public PhotosController(UserStorage userStorage, PhotoMetaDataStorage photoMetaDataStorage, PhotoImporter photoImporter, PhotoStorage photoStorage, Config config) : base(userStorage, config)
 {
     this.photoMetaDataStorage = photoMetaDataStorage;
     this.photoImporter        = photoImporter;
     this.photoStorage         = photoStorage;
 }
Esempio n. 5
0
 public PhotoService(IUnitOfWork unitOfWork, PhotoStorage photoStorage)
 {
     this.photoStorage = photoStorage;
     this.unitOfWork   = unitOfWork;
 }