Exemple #1
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);
            }
            }
        }
Exemple #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());
        }
Exemple #3
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");
        }
 public override bool OnClick(TouchEvent touch, UISound uiSound)
 {
     if (m_main.Check(m_alphabet))
     {
         RootTransform.Find("Button").gameObject.SetActive(false);
     }
     return(true);
 }
Exemple #5
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");
     }
 }
Exemple #6
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;
        }
Exemple #7
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();
        }
Exemple #8
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;
        }
Exemple #9
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();
    }
Exemple #10
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");
        }
    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();
    }
Exemple #12
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);
        }
Exemple #13
0
 public override async UniTask OnLoadedBase()
 {
     RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false);
     RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false);
 }
Exemple #14
0
        public override async UniTask OnLoadedPart(UIBase targetLayer)
        {
            Text text = RootTransform.Find("Text").GetComponent <Text>();

            text.text = "create";
        }
Exemple #15
0
    public override async UniTask OnLoadedBase()
    {
        Text score = RootTransform.Find("Panel/Score").GetComponent <Text>();

        score.text = m_score.ToString("N2");
    }
 public void Open()
 {
     RootTransform.Find("Button").gameObject.SetActive(true);
     RootTransform.GetComponent <Animation>().Play();
 }