コード例 #1
0
        protected override void OnInstanceCreate()
        {
            base.OnInstanceCreate();
            UnitCharacterQuestWindow componentInChildren = (UnitCharacterQuestWindow)this.Instance.GetComponentInChildren <UnitCharacterQuestWindow>();

            if (Object.op_Equality((Object)componentInChildren, (Object)null))
            {
                return;
            }
            componentInChildren.CurrentUnit = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.PreBattleUnitUniqueID);

            ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).SetCollision(false);
            ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).OnWindowStateChange = new WindowController.WindowStateChangeEvent(this.OnBack);
            WindowController.OpenIfAvailable((Component)componentInChildren);
        }
コード例 #2
0
        private void OnBack(GameObject go, bool visible)
        {
            if (visible)
            {
                return;
            }
            UnitCharacterQuestWindow componentInChildren = (UnitCharacterQuestWindow)this.Instance.GetComponentInChildren <UnitCharacterQuestWindow>();

            if (Object.op_Equality((Object)componentInChildren, (Object)null) || visible)
            {
                return;
            }
            ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).SetCollision(true);
            ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).OnWindowStateChange = (WindowController.WindowStateChangeEvent)null;
            Object.Destroy((Object)((Component)componentInChildren).get_gameObject());
        }