void Init() { if (dungeonCard == null) { dungeonCard = FindObjectOfType <DungeonCardSystem>(); } CardsDealt.Clear(); drawnCards.Clear(); howManyAdded = 0.0f; currentDeck = CardInventory.instance.dungeonCards; HandDeckPos = HandDeck; DungeonCardsSelected.Clear(); cardsRevealed = 0; DungeonCardUI.selectCardDelegate += CheckCardsSelected; DungeonCardUI.revealCardDelegate += AfterSelection; SpiritCardUI.selectCardDelegate += AfterSpiritSelection; spirits = CardInventory.instance.spiritCards; if (portalToDungeon != null) { portalToDungeon.gameObject.SetActive(false); } }
private void Awake() { if (dungeonSystem == null) { dungeonSystem = FindObjectOfType <DungeonCardSystem>(); } PortalToHub.SetActive(false); }
protected void Awake() { if (SceneManager.GetActiveScene().name == mainSceneName) { portalDungeon = GameObject.Find("PortalToDungeon"); portalToDungeon = portalDungeon.GetComponent <Portal>(); } if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(this); } DontDestroyOnLoad(this.gameObject); }