Пример #1
0
    public virtual void ContextEnableRunOptions()
    {
        StartCoroutine(disableDropCards());
        GetComponent <LayoutController>().squeezeIn();
        // display context options for run or sets
        DropGuideLeft.SetActive(true);
        DropGuideRight.SetActive(true);
        // set context values
        if (getFirstCardInDrop() != 1)
        {
            DropGuideLeft.GetComponent <DropContextController>().setHeader("<");
            DropGuideLeft.GetComponent <Button>().onClick.AddListener(ContextSetRunFirstCard);
        }
        else
        {
            DropGuideLeft.SetActive(false);
        }

        if (getLastCardInDrop() != 13)
        {
            DropGuideRight.GetComponent <DropContextController>().setHeader(">");
            DropGuideRight.GetComponent <Button>().onClick.AddListener(ContextSetRunLastCard);
        }
        else
        {
            DropGuideRight.SetActive(false);
        }

        canDrop = false;
    }
Пример #2
0
 public virtual void ContextDisable()
 {
     // remove event listeners
     DropGuideLeft.GetComponent <Button>().onClick.RemoveAllListeners();
     DropGuideRight.GetComponent <Button>().onClick.RemoveAllListeners();
     // disable context options
     DropGuideLeft.SetActive(false);
     DropGuideRight.SetActive(false);
     // enable interactability for cards
     StartCoroutine(enableDropCards());
     GetComponent <LayoutController>().fanOut();
 }
Пример #3
0
 public virtual void ContextEnableOutOptions()
 {
     // disable cards from being interactable
     StartCoroutine(disableDropCards());
     // squeeze cards to center
     GetComponent <LayoutController>().squeezeIn();
     // display context options for run or sets
     DropGuideLeft.SetActive(true);
     DropGuideRight.SetActive(true);
     // set context values
     DropGuideLeft.GetComponent <DropContextController>().setHeader("Run");
     DropGuideLeft.GetComponent <Button>().onClick.AddListener(ContextSetRun);
     DropGuideRight.GetComponent <DropContextController>().setHeader("Set");
     DropGuideRight.GetComponent <Button>().onClick.AddListener(ContextSetSet);
     canDrop = false;
 }