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); }
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 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 bool OnClick(TouchEvent touch, UISound uiSound) { if (m_main.Check(m_alphabet)) { RootTransform.Find("Button").gameObject.SetActive(false); } return(true); }
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"); }
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; }
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); }
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 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() { 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 virtual void Destroy() { OnDestroy(); if (RootTransform != null) { RootTransform.SetParent(null); Object.Destroy(RootTransform.gameObject); RootTransform = null; } Animators = null; m_StopCallback = null; }
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() { 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); }
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); }
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"; }
void Awake() { Instance = this; }
public void Open() { RootTransform.Find("Button").gameObject.SetActive(true); RootTransform.GetComponent <Animation>().Play(); }
public override async UniTask OnLoadedBase() { Text score = RootTransform.Find("Panel/Score").GetComponent <Text>(); score.text = m_score.ToString("N2"); }