void Update() { //Debug.Log(hovered); if (hovered) { currentTime += Time.deltaTime; if (currentTime > GameConstants.hoverInspectTime) { currentTime = GameConstants.hoverInspectTime; if (!inspecting) { StatHandler blk = mkr.GetComponent <StatHandler>(); controller.cardInspect(mkr.gameObject, blk ? blk.prefabStats() : null); inspecting = true; } } } else { currentTime = 0; if (inspecting) { controller.cardUnInspect(mkr.gameObject); inspecting = false; } } }
public void incrementCount(int delta) { //Debug.Log(delta); if (count + delta <= GameConstants.maxCardDuplicateLimit) { count += delta; if (count <= 0) { if (inspecting) { controller.cardUnInspect(mkr.gameObject); inspecting = false; } Destroy(gameObject); //return true; } setCountText(); int trueDelta = delta; if (count < 0) { trueDelta -= count; } if (type == DeckbuildingUI.deckType.main) { controller.currentMainDeckSize += trueDelta; } else { controller.currentStrcDeckSize += trueDelta; } controller.deckSizeUpdate(); } //return false; }