コード例 #1
0
        private void SetTimerActive(Transform tr, bool value)
        {
            if (Object.op_Equality((Object)tr, (Object)null))
            {
                return;
            }
            QuestTimeLimit component = (QuestTimeLimit)((Component)tr).GetComponent <QuestTimeLimit>();

            if (!Object.op_Inequality((Object)component, (Object)null))
            {
                return;
            }
            if (Object.op_Inequality((Object)component.Body, (Object)null))
            {
                component.Body.SetActive(value);
            }
            else
            {
                Transform child1 = tr.FindChild("bg");
                if (Object.op_Inequality((Object)child1, (Object)null))
                {
                    Transform child2 = child1.FindChild("timer_base");
                    if (Object.op_Inequality((Object)child2, (Object)null))
                    {
                        ((Component)child2).get_gameObject().SetActive(value);
                    }
                }
            }
            ((Behaviour)component).set_enabled(value);
        }
コード例 #2
0
        private void SetQuestTimerActive(Transform obj, bool value)
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object)obj, (UnityEngine.Object)null))
            {
                return;
            }
            QuestTimeLimit component = (QuestTimeLimit)((Component)obj).GetComponent <QuestTimeLimit>();

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
            {
                ((Behaviour)component).set_enabled(value);
            }
            Transform child1 = obj.FindChild("bg");

            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)child1, (UnityEngine.Object)null))
            {
                return;
            }
            Transform child2 = child1.FindChild("timer_base");

            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)child2, (UnityEngine.Object)null))
            {
                return;
            }
            ((Component)child2).get_gameObject().SetActive(value);
        }