Пример #1
0
        private void InitRootTransform()
        {
            // UIPartの追加先を決定する
            Transform layer = m_TargetPart.RootTransform.Find("Layer");

            RootTransform.SetParent(layer);
            RootTransform.localPosition = new Vector3(0, 0, 0);
            RootTransform.localScale    = Vector3.one;
        }
Пример #2
0
        public override async UniTask OnLoadedPart(UIBase targetLayer)
        {
            Text text = RootTransform.Find("Text").GetComponent <Text>();

            text.text = m_id.ToString();

            Transform layer = targetLayer.RootTransform.Find("Layer");

            RootTransform.SetParent(layer);
            RootTransform.localPosition = new Vector3(426, 100 * m_id, 0);
            RootTransform.localScale    = Vector3.one;
        }
Пример #3
0
        public virtual void Destroy()
        {
            OnDestroy();

            if (RootTransform != null)
            {
                RootTransform.SetParent(null);
                Object.Destroy(RootTransform.gameObject);
                RootTransform = null;
            }

            Animators      = null;
            m_StopCallback = null;
        }
Пример #4
0
    public override async UniTask OnLoadedPart(UIBase targetLayer)
    {
        RootTransform.SetParent(targetLayer.RootTransform.Find("Panel"));
        RootTransform.localScale = Vector3.one;

        Transform alphabet = RootTransform.Find("Button/Alphabet");
        Image     img      = alphabet.GetComponent <Image>();

        img.sprite = Resources.Load <Sprite>("MiniGame/Images/" + m_alphabet.ToString());

        RootTransform.Find("Button").gameObject.SetActive(false);

        await UniTask.Yield();
    }