Beispiel #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);
        }
        protected override void OnInstanceCreate()
        {
            base.OnInstanceCreate();
            CollaboSkillQuestList componentInChildren = (CollaboSkillQuestList)this.Instance.GetComponentInChildren <CollaboSkillQuestList>();

            if (Object.op_Equality((Object)componentInChildren, (Object)null))
            {
                return;
            }
            CollaboSkillParam.Pair collaboSkillPair = GlobalVars.SelectedCollaboSkillPair;
            if (collaboSkillPair == null)
            {
                DebugUtility.LogError("CollaboSkillParam.Pair が セットされていない");
            }
            else
            {
                componentInChildren.CurrentUnit1 = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueParam(collaboSkillPair.UnitParam1);

                componentInChildren.CurrentUnit2 = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueParam(collaboSkillPair.UnitParam2);

                if (componentInChildren.CurrentUnit1 == null)
                {
                    DebugUtility.LogError("window.CurrentUnit1 == null");
                }
                else if (componentInChildren.CurrentUnit2 == null)
                {
                    DebugUtility.LogError("window.CurrentUnit2 == null");
                }
                else
                {
                    ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).SetCollision(false);
                    ((WindowController)((Component)componentInChildren).GetComponent <WindowController>()).OnWindowStateChange = new WindowController.WindowStateChangeEvent(this.OnBack);
                    WindowController.OpenIfAvailable((Component)componentInChildren);
                }
            }
        }