コード例 #1
0
 //Populate the details info passed down from attractions.
 public void Populate(Region.Attraction attraction)
 {
     txtAttractionTitle.text       = attraction.fullText.name;
     txtAttractionDescription.text = attraction.fullText.text;
     txtAddress           = attraction.address;
     arrayIndex           = 0;
     imgBackground.sprite = attraction.carouselImages[arrayIndex];
     attractionData       = attraction;
     CreateImgPosPref();
 }
コード例 #2
0
 //Give each attraction a name and bg image
 public void Initialize(Region.Attraction a)
 {
     attraction           = a;
     txtTitle.text        = attraction.fullText.name;
     imgBackground.sprite = attraction.attractionImg;
 }
コード例 #3
0
    //Create attraction prefabs when region is clicked
    public void Add(Region.Attraction a)
    {
        UIAttraction newAttraction = Instantiate(prefAttraction, attractionContainer);

        newAttraction.Initialize(a);
    }