Esempio n. 1
0
        public override async UniTask OnLoadedBase()
        {
            UIBaseLayer previewFieldLayer = UIController.Instance.GetBaseLayer(typeof(PreviewFieldBase));

            m_PreviewFieldBase = previewFieldLayer.Base as PreviewFieldBase;

            UIBaseLayer mixedBallTabBase = UIController.Instance.GetBaseLayer(typeof(MixedBallTabBase));

            m_MixedBallTabBase = mixedBallTabBase.Base as MixedBallTabBase;

            m_LaboScrollerView = RootTransform.GetComponent <LaboScrollerView>();
            InitLaboScrollerController();

            List <UIPart> parts = new List <UIPart>
            {
                // new HomeTabPart(m_LaboScrollerView.m_TabView, JumpToDataIndex)
            };

            // 追加待ち
            await UIController.Instance.YieldAttachParts(this, parts);

            const int FIRST_INDEX = 2;

            m_LaboScrollerView.m_Scroller.JumpToDataIndex(FIRST_INDEX);
        }
Esempio n. 2
0
        public override async UniTask OnLoadedBase()
        {
            RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false);

            UIController.Instance.AddFront(new Sample04Dialog());
        }
Esempio n. 3
0
        public override bool OnClick(TouchEvent touch, UISound uiSound)
        {
            switch (touch.Listener.name)
            {
            case "ButtonTop": {
                if (m_attached)
                {
                    return(false);
                }

                Transform bottom = RootTransform.Find("Layer/ButtonBottom");
                UIController.Instance.AttachParts(this, new List <UIPart>()
                    {
                        new Sample16Factory(this, bottom)
                    });
                m_attached = true;
                return(true);
            }

            case "ButtonBottom": {
                Debug.Log("before attach bottom button");
                return(true);
            }

            default: {
                return(false);
            }
            }
        }
Esempio n. 4
0
 public override bool OnClick(TouchEvent touch, UISound uiSound)
 {
     if (m_main.Check(m_alphabet))
     {
         RootTransform.Find("Button").gameObject.SetActive(false);
     }
     return(true);
 }
Esempio n. 5
0
        public override async UniTask OnLoadedBase()
        {
            RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonCenter").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false);

            Debug.Log("Scene04 : All Right");
        }
Esempio n. 6
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;
        }
Esempio n. 7
0
        public override async UniTask OnLoadedBase()
        {
            // var laboScrollerLayer = UIController.Instance.GetBaseLayer(typeof(LaboScrollerBase));
            m_PreviewFieldView = RootTransform.GetComponent <PreviewFieldView>();
            List <UIPart> parts = new List <UIPart>();

            // 追加待ち
            await UIController.Instance.YieldAttachParts(this, parts);
        }
Esempio n. 8
0
 public override void OnDispatchedEvent(DispatchedEvent dispatchedEvent)
 {
     if (dispatchedEvent.EventName == "Sample")
     {
         Text text = RootTransform.Find("Layer/Text").GetComponent <Text>();
         text.text = ((DispachParams)dispatchedEvent.Param).count.ToString();
         Debug.Log("Scene11 : All Right");
     }
 }
Esempio n. 9
0
        public override async UniTask OnLoadedBase()
        {
            RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonCenter").gameObject.SetActive(false);

            UIController.Instance.AddFront(new Sample11Dialog());

            IsScheduleUpdate = true;
        }
Esempio n. 10
0
        public override void OnUpdate()
        {
            if (++m_count >= 100)
            {
                UIController.Instance.SetScreenTouchable(this, true);
                IsScheduleUpdate = false;
            }
            Text text = RootTransform.Find("Layer/Text").GetComponent <Text>();

            text.text = m_count.ToString();
        }
Esempio n. 11
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;
        }
Esempio n. 12
0
    public override async UniTask OnLoadedBase()
    {
        for (int i = AlphabetNum - 1; i >= 0; i--)
        {
            char a = GetAlphabetByIndex(i);
            m_alphabets.Add(new PartMiniGameAlphabet(this, a));
        }

        await UIController.Instance.YieldAttachParts(this, m_alphabets.ConvertAll <UIPart>(x => x));

        m_timeText = RootTransform.Find("Panel/Time").GetComponent <Text>();
        Initialize();
    }
Esempio n. 13
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();
    }
Esempio n. 14
0
        public override async UniTask OnLoadedBase()
        {
            await UniTask.DelayFrame(120);

            Text text = RootTransform.Find("Layer/Text").GetComponent <Text>();

            text.text = "Scene";

            RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonCenter").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false);

            Debug.Log("Scene01 : All Right");
        }
Esempio n. 15
0
        public virtual void Destroy()
        {
            OnDestroy();

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

            Animators      = null;
            m_StopCallback = null;
        }
Esempio n. 16
0
        public override async UniTask OnLoadedBase()
        {
            RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonCenter").gameObject.SetActive(false);
            RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false);

            List <UIPart> parts = new List <UIPart>();
            const int     num   = 4;

            for (int i = 1; i <= num; i++)
            {
                parts.Add(new Sample14Button(i));
            }
            await UIController.Instance.YieldAttachParts(this, parts);
        }
Esempio n. 17
0
        public override async UniTask OnLoadedBase()
        {
            m_HomeScrollerView = RootTransform.GetComponent <HomeScrollerView>();
            InitHomeScrollerController();

            List <UIPart> parts = new List <UIPart>
            {
                // new HomeTabPart(m_HomeScrollerView.m_TabObject, JumpToDataIndex)
            };

            // 追加待ち
            await UIController.Instance.YieldAttachParts(this, parts);

            const int FIRST_INDEX = 2;

            m_HomeScrollerView.m_Scroller.JumpToDataIndex(FIRST_INDEX);
        }
Esempio n. 18
0
        public override async UniTask OnLoadedBase()
        {
            UIBaseLayer homeScrollerLayer = UIController.Instance.GetBaseLayer(typeof(HomeScrollerBase));

            m_HomeScrollerBase = homeScrollerLayer.Base as HomeScrollerBase;
            m_HomeTabView      = RootTransform.GetComponent <HomeTabView>();

            List <UIPart> parts = new List <UIPart>();

            for (int i = 0; i < m_HomeTabView.m_ButtonViews.Length; i++)
            {
                int index = i;
                parts.Add(new ButtonPart(m_HomeTabView.m_ButtonViews[i], () => ClickTabButton(index)));
            }

            // 追加待ち
            await UIController.Instance.YieldAttachParts(this, parts);
        }
Esempio n. 19
0
 public override async UniTask OnLoadedBase()
 {
     RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false);
     RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false);
 }
Esempio n. 20
0
        public override async UniTask OnLoadedPart(UIBase targetLayer)
        {
            Text text = RootTransform.Find("Text").GetComponent <Text>();

            text.text = "create";
        }
Esempio n. 21
0
	void Awake()
	{
		Instance = this;
	}
Esempio n. 22
0
 public void Open()
 {
     RootTransform.Find("Button").gameObject.SetActive(true);
     RootTransform.GetComponent <Animation>().Play();
 }
Esempio n. 23
0
    public override async UniTask OnLoadedBase()
    {
        Text score = RootTransform.Find("Panel/Score").GetComponent <Text>();

        score.text = m_score.ToString("N2");
    }