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); } } }
public override async UniTask OnLoadedBase() { RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false); RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false); UIController.Instance.AddFront(new Sample04Dialog()); }
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); }
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"); } }
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; }
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(); }
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; }
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(); }
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(); }
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); }
public override async UniTask OnLoadedBase() { RootTransform.Find("Layer/ButtonTop").gameObject.SetActive(false); RootTransform.Find("Layer/ButtonBottom").gameObject.SetActive(false); }
public override async UniTask OnLoadedPart(UIBase targetLayer) { Text text = RootTransform.Find("Text").GetComponent <Text>(); text.text = "create"; }
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(); }