Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
Cards animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Team-on committed Jan 31, 2021
1 parent d5c9e88 commit bc6c593
Show file tree
Hide file tree
Showing 7 changed files with 313 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ public class MenuManager : MonoBehaviour {
Stack<MenuBase> currMenu;

void Start() {

currMenu = new Stack<MenuBase>();
currMenu.Push(Menus[FirstMenuId]);
MenuBase firstMenu = currMenu.Peek();

TemplateGameManager.Instance.uiinput.SetSelectedButton(null);

foreach (var menu in Menus) {
if (menu != currMenu.Peek())
if (menu != firstMenu)
menu.Hide(true);

if(menu.rt.anchorMin == Vector2.zero && menu.rt.anchorMax == Vector2.one && menu.rt.pivot.x == 0.5f && menu.rt.pivot.y == 0.5f && !(menu is PopupMenuBase)) {
Expand All @@ -35,7 +37,7 @@ void Start() {
IEnumerator DelayedShow() {
yield return null;
yield return null;
currMenu.Peek().Show(true);
firstMenu.Show(true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public class PopupMenuBase : MenuBase {

protected bool isShowed = true;

private void Start() {
protected override void Awake() {
base.Awake();

RecalcPos();

cg.interactable = cg.blocksRaycasts = true;
Expand Down
Loading

0 comments on commit bc6c593

Please sign in to comment.