Exemplo n.º 1
0
 public void OnImageAgentClicked(SingleImageAgent agent)
 {
     m_scrollView.gameObject.SetActive(false);
     m_singleView.gameObject.SetActive(true);
     m_singleViewImage.GetComponent <RawImage>().texture = agent.m_texture;
     m_imageScaleSlider.value = 0;
 }
Exemplo n.º 2
0
        public static SingleImageAgent __Create(AlbumPlayer player, string imagePath)
        {
            GameObject obj = ResourceManager.Inst.GetPrefab("Prefab/SingleImage");

            obj = Instantiate(obj);
            SingleImageAgent res = obj.GetComponent <SingleImageAgent>();

            res.m_albumPlayer = player;
            res.m_imagePath   = imagePath;
            res.m_texture     = ResourceManager.Inst.GetTexture2D(imagePath);
            return(res);
        }
Exemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            for (int i = 0; i < 20; i++)
            {
                var agent = SingleImageAgent.__Create(this, "Image/CUI_photo" + Random.Range(0, 5));
                agent.transform.SetParent(m_scrollViewContent);
                agent.transform.localEulerAngles = Vector3.zero;
                agent.transform.localScale       = Vector3.one;
                m_imageAgentList.Add(agent);
            }

            RearrangeImages();
        }