/// <summary> /// Awake is called when the script instance is being loaded. /// </summary> void Awake() { drag = GetComponent <CardDrag>(); flip = GetComponent <CardFlip>(); if (isDummy) { return; } audioSource = GetComponent <AudioSource>(); canvasGroup = GetComponent <CanvasGroup>(); cardTexture = ReferencesManager.instance.cardFront.GetComponent <Image>(); cardDescriptionText = ReferencesManager.instance .cardDescriptionText .GetComponent <Text>(); leftDecisionDropZone = ReferencesManager.instance .leftDropZone .GetComponent <DropZone>(); rightDecisionDropZone = ReferencesManager.instance .rightDropZone .GetComponent <DropZone>(); helpText = ReferencesManager.instance .helpText .GetComponent <Text>(); originalPosition = transform.localPosition; }
void Awake() { image = GetComponent <Image>(); cardDrag = GetComponent <CardDrag>(); cardFront = transform.Find("Card Front"); cardBack = transform.Find("Card Back"); descPanelCanvasGroup = ReferencesManager.instance.cardDescription.GetComponent <CanvasGroup>(); _face = CardFace.FRONT; }