Example #1
0
 void InitUICtrl()
 {
     DayCount            = DayCountObject.GetComponent <Text>();
     DayCountShadow      = DayCountShadowObject.GetComponent <Text>();
     storyMgr            = GameObject.FindGameObjectWithTag("STORY").GetComponent <StoryMgr>();
     canvas              = GameObject.FindGameObjectWithTag("CANVAS");
     storyMgr.UI         = gameObject.GetComponent <UICtrl>();
     Exit_S_Inven_Event += TempFuntion;
 }
Example #2
0
 void Awake()
 {
     story  = GameObject.FindGameObjectWithTag("STORY").GetComponent <StoryMgr>();
     TextRt = Text.GetComponent <RectTransform>();
     String = Text.GetComponent <Text>();
     if (story.NextStory.Length > 10)
     {
         String.text = story.NextStory;
     }
     if (story.Scroll_Image != null)
     {
         image.sprite       = story.Scroll_Image;
         story.Scroll_Image = null;
     }
     Content.GetComponent <RectTransform>().sizeDelta = new Vector2(0, String.preferredHeight * 0.1f + 200);
 }