private void OnMouseDown() { if (!clickedOn) { gameController.cardClickedOn(hitBoxDataForCard, attackDamageOfCard); //sends the info about attack attached to the card to the gamecontroller clickedOn = true; //Debug.Log (gameObject.GetComponent<CardScript> ().AttackValue); deckScript.setCurrentCard(gameObject.GetComponent <CardScript>()); } else { clickedOn = false; deckScript.emptyCurrentCard(); } }