Exemplo n.º 1
0
    public override void Init()
    {
        base.Init();
        for (int i = 0; i < base.gameObject.transform.childCount; i++)
        {
            GameObject gameObject = base.gameObject.transform.GetChild(i).gameObject;
            this.m_ItemsElelements.Add(gameObject);
            NotepadData component = gameObject.GetComponent <NotepadData>();
            if (component)
            {
                component.Init();
            }
        }
        int num = 0;

        for (int j = 0; j < this.m_ItemsElelements.Count; j++)
        {
            Text[] componentsDeepChild = General.GetComponentsDeepChild <Text>(this.m_ItemsElelements[j]);
            for (int k = 0; k < componentsDeepChild.Length; k++)
            {
                componentsDeepChild[k].text = GreenHellGame.Instance.GetLocalization().Get(componentsDeepChild[k].name, true);
            }
            PageNum component2 = this.m_ItemsElelements[j].GetComponent <PageNum>();
            if (component2.m_PageNum + 1 > num)
            {
                num = component2.m_PageNum + 1;
            }
        }
        this.m_NumActivePages = num * 2;
    }
Exemplo n.º 2
0
 public override void Init()
 {
     base.Init();
     this.m_LeftDummyPosition.Set(-103.4f, 72.2f, 1920f);
     this.m_RightDummyPosition.Set(23.6f, 72.2f, 1920f);
     for (int i = 0; i < base.gameObject.transform.childCount; i++)
     {
         GameObject gameObject = base.gameObject.transform.GetChild(i).gameObject;
         if (!(gameObject.name == "LeftPageDummy") && !(gameObject.name == "RightPageDummy"))
         {
             this.m_ItemsElelements.Add(gameObject);
             NotepadData component = gameObject.GetComponent <NotepadData>();
             if (component)
             {
                 component.Init();
             }
         }
     }
     for (int j = 0; j < this.m_ItemsElelements.Count; j++)
     {
         Text[] componentsDeepChild = General.GetComponentsDeepChild <Text>(this.m_ItemsElelements[j]);
         for (int k = 0; k < componentsDeepChild.Length; k++)
         {
             componentsDeepChild[k].text = GreenHellGame.Instance.GetLocalization().Get(componentsDeepChild[k].name, true);
         }
     }
 }