Ejemplo n.º 1
0
    public void startPostingMinigame()
    {
        if (captionManager == null)
        {
            captionManager = GameObject.Find("CaptionManager").GetComponent <CaptionSelectManager>();
        }
        if (photoManager == null)
        {
            photoManager = GameObject.Find("Photo").GetComponent <PhotoMaterialsManager>();
        }
        if (postImages == null)
        {
            Debug.Log("Something bad happened!!!");
            return;
        }

        int imagesLen = postImages.images.Length;
        int index     = Random.Range(0, imagesLen);

        currImage = postImages.images[index];
        photoManager.setImage(getImage(currImage.imagePath));
        photoManager.SetFilters(currImage.filters);
        captionManager.SetCaptions(currImage.captions);
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     gameManager    = GameObject.Find("GameManager").GetComponent <GameManager>();
     captionManager = GameObject.Find("CaptionManager").GetComponent <CaptionSelectManager>();
     photoManager   = GameObject.Find("Photo").GetComponent <PhotoMaterialsManager>();
 }