public void deactivate() { isActive = false; deck = null; deckButton = null; gameObject.SetActive(false); gameObject.name = "charm unused"; }
public void activate(DBDeck _deck, DBDeckButtonGO _deckButton, Charm.CharmType _type) { deck = _deck; deckButton = _deckButton; type = _type; isActive = true; gameObject.SetActive(true); gameObject.name = "charm " + deck.displayName + " " + type; gameObject.SetActive(true); mouseIsOver = false; }
//supplying the shell objects public DBDeckButtonGO getDeckButtonGO() { //check if we have any inactive in the list for (int i = 0; i < deckButtons.Count; i++) { if (deckButtons [i].IsActive == false) { return(deckButtons [i]); } } //otherwise make one GameObject obj = Instantiate(deckButtonPrefab) as GameObject; DBDeckButtonGO GO = obj.GetComponent <DBDeckButtonGO> (); deckButtons.Add(GO); return(GO); }