public void Swap(CUIGroup newGroup, bool instant = false) { if (newGroup == activeGroup) { return; } if (activeGroup) { if (instant) { CUIManager.SwapAnimate(activeGroup, newGroup, -1f, CUIAnimation.InstantOut, CUIAnimation.InstantIn); } else { CUIManager.SwapAnimate(activeGroup, newGroup); } } else { if (instant) { CUIManager.Animate(newGroup, CUIAnimation.InstantIn); } else { CUIManager.Animate(newGroup, true); } } activeGroup = newGroup; }
private void ShowGamesGrid() { if (activeGroup != gridView) { CUIManager.SwapAnimate(activeGroup, gridView); activeGroup = gridView; } gridDisplayGroup.MakeGames(); }
public void Button_Home() { // if (isShowingGameDetails) HideGameDetails(); if (activeGroup == welcomeView) { return; } CUIManager.SwapAnimate(activeGroup, welcomeView); activeGroup = welcomeView; favoritesDispalyGroup.MakeGames(); }
public void FindChildrenGroups() { groups.Clear(); foreach (Transform child in transform) { CUIGroup found = child.GetComponent <CUIGroup>(); if (found != null) { groups.Add(found); } } if (!Application.isPlaying) { Debug.Log(gameObject.name + " found " + groups.Count + " CUIGroups!"); } }
public override void OnInit() { base.OnInit(); //StartCoroutine(LibraryHelper.I.LoadGameLibraryImages(false)); LibraryHelper.I.PopulateDPGamesLibrary(false); //CUIManager.Animate(welcomeView, CUIAnimation.FadeIn); // activeGroup = welcomeView; // welcomePanel.Show(); // gridPanel.Hide(true); // StartCoroutine(LoadLibraryGameImages()); CUIManager.Animate(welcomeView, CUIAnimation.FadeIn); activeGroup = welcomeView; StartCoroutine(favoritesDispalyGroup.MakeGamesDelayed()); //favoritesDispalyGroup./ }
//Used to GetComponent to any references you need protected void Reset() { group = GetComponent <CUIGroup>(); }