public void UpdateCurrentDeck(GameObject newDeck) { if (GameManager.Instance.inputManager.currentSelectedCard != null) { GameManager.Instance.inputManager.currentSelectedCard.abortHandler(); } if (currentDeck != null && currentDeck != newDeck) { deckAnimationDisappear.rectTransform = (RectTransform)currentDeck.transform; currentDeck.GetComponent <CanvasGroup>().blocksRaycasts = false; deckAnimationDisappear.GetCanvasGroup(); StartCoroutine(deckAnimationDisappear.anim.Play(deckAnimationDisappear, deckAnimationDisappear.originalPos)); } if (currentDeck != newDeck) { if (!newDeck.activeSelf) { newDeck.SetActive(true); } currentDeck = newDeck; deckAnimationAppear.rectTransform = (RectTransform)currentDeck.transform; deckAnimationAppear.GetCanvasGroup(); StartCoroutine(deckAnimationAppear.anim.Play(deckAnimationAppear, deckAnimationAppear.originalPos)); currentDeck.GetComponent <CanvasGroup>().blocksRaycasts = true; //Play Sound soundHandler.PlaySound(entitySelectionClip, soundSource, targetGroup); } }
private void Start() { if (testTweenAnimator.rectTransform != null) { testTweenAnimator.GetCanvasGroup(); } }
// Start is called before the first frame update public void Initalize() { animator.anim = Instantiate(animator.anim); spotlightAnim.anim = Instantiate(spotlightAnim.anim); spotlightAnim.GetCanvasGroup(); button = GetComponent <Button>(); button.onClick.AddListener(SelectEntity); }
private void Start() { deckUI = GameManager.Instance.uiHandler.entityDeckUI; holdAnim = deckUI.descriptionContainerAnim; if (dragAnim.rectTransform != null) { dragAnim.GetCanvasGroup(); dragAnim.anim = Instantiate(dragAnim.anim); } if (selectedAnim.rectTransform != null) { selectedAnim.anim = Instantiate(selectedAnim.anim); } holdAnim.GetCanvasGroup(); holdAnim.anim = Instantiate(holdAnim.anim); }
public void Initialize() { for (int i = 0; i < handler.entities.Count; i++) { GameObject temp = Instantiate(handler.entities[i].entityDeck, container.transform); temp.SetActive(false); handler.entities[i].entityDeck = temp; decks.Add(temp); handler.uIElements.Add(temp); } soundHandler = GameManager.Instance.soundHandler; descriptionContainerAnim.GetCanvasGroup(); descriptionContainerAnim.anim = Instantiate(descriptionContainerAnim.anim); descriptionPanelAnim.anim = Instantiate(descriptionPanelAnim.anim); deckAnimationAppear.anim = Instantiate(deckAnimationAppear.anim); deckAnimationDisappear.anim = Instantiate(deckAnimationDisappear.anim); }
// Start is called before the first frame update void Start() { blur.GetCanvasGroup(); victoryPanel.anim = Instantiate(victoryPanel.anim); blur.anim = Instantiate(blur.anim); }
private void Start() { appearAnim.GetCanvasGroup(); moveAnim.GetCanvasGroup(); iconRectTranform = gameObject.GetComponent <RectTransform>(); }