public void OnClick() { if (clickable) { if (SceneManager.GetActiveScene().name == "GameScene" && TurnManager.Instance.gameState == GameState.Buying) { shopRef.OnCardClick(this, myData); } else if (SceneManager.GetActiveScene().name == "DeckMakingScene") //U can only find cards in the deck-making scene other than in the actual gamescene. { //If its clicked in the "All Cards Panel" // If Unlocked: // - Ask if u want to add it to the deck // - Add it deckmanagerRef.AddCard(this, myData); } } if (!clickable) { //maybe remove card } }
public void OnClick() { //Tell the shop! shopRef.OnCardClick(this, myData); }